# n8n

[n8n](https://n8n.io/) is an open-source workflow automation platform that enables developers and businesses to connect APIs, services, and custom logic through visual, node-based workflows. It’s designed for flexibility and extensibility, allowing users to orchestrate complex data flows and automate repetitive tasks without writing full applications. With their `Basic LLM Chain` and `AI Agent` nodes, you can connect to language models across a variety of platforms.

This tutorial will guide you through how to use Arcee AI language models in n8n via OpenRouter.

***

**Prerequisites**

* n8n Account
  * If you do not have an n8n account, get started [here](https://docs.n8n.io/).

**Quickstart**

Download the workflow schema below

{% file src="/files/yvbZTYMJkiI9r73KPl0t" %}

{% hint style="info" %}
Right click on the file above and select "Open in a New Tab", the page you'll see is the workflow JSON schema. Right click on the page and select "Save as..." to save the file.
{% endhint %}

2. In your blank n8n workflow, select the ellipsis (3 dots "...") in the top right corner and select "Import from File". and select `Build your first Arcee AI agent.json.` Your workflow will now look like this:

<figure><img src="/files/Qelops7BiclI0ToYU7vJ" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
This workflow takes in a prompt from chat and passes it to an AI Agent. The AI Agent is powered by a language model (which we'll set to be an Arcee AI model) and has access to memory. With this node you can also configure tools to have your agent access outside systems and APIs.
{% endhint %}

Select the OpenRouter Chat Model node and setup your credentials for OpenRouter using an OpenRouter API Key. Select the Arcee AI model you want to use.

**Your OpenRouter Chat Model configuration should now look like this:**

<figure><img src="/files/JS63BfgIzj19DwmQP2P6" alt="" width="375"><figcaption></figcaption></figure>

Select Open Chat and send a message to your agent

<figure><img src="/files/LKG1gBJYqS35EBtdkl2M" alt=""><figcaption></figcaption></figure>

Your message will be passed to the Agent Node, which invokes the model and stores the messages in conversation memory.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arcee.ai/get-started/integration-list/n8n.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
