What n8n plus Claude actually is
n8n is a node-based workflow automation platform. You build flows by connecting nodes that trigger on events, transform data, call APIs, and branch on conditions. It is open source, self-hostable, and has a hosted cloud option. The visual canvas is the main interface, though everything is also serializable as JSON you can version control.
Claude is Anthropic’s family of large language models. To use Claude inside n8n, you make API calls to Anthropic’s Messages endpoint. There are two ways to do this in n8n. The first is the native Anthropic node, which wraps the API in a friendly UI. The second is the generic HTTP Request node pointed at api.anthropic.com, which gives you full control but more setup.
Strip away the marketing and the integration is just a credentialed HTTP call with prompt templating. The value is not magic. It is that n8n handles the orchestration around the call: triggers, retries, branching, logging, and chaining into other services like Slack, Postgres, or your CRM.
For most users, the native Anthropic node is the right starting point. It handles authentication, exposes the common parameters (model, max_tokens, system prompt, temperature), and returns parsed output you can reference in downstream nodes using n8n’s expression syntax.
Setup and authentication
You have three main ways to run n8n. The fastest path is the hosted version at n8n.cloud, which gives you a managed instance with no infrastructure. If you want full control, n8n runs well in Docker with a single container, or you can install it via npm with npm install n8n -g and run n8n start.
For local development, Docker is usually the cleanest option. A minimal setup uses the official image with a mounted data volume for persistence. The default port is 5678, and you access the editor at http://localhost:5678.
Once n8n is running, you need an Anthropic API key. Sign in to console.anthropic.com, go to Settings, then API Keys, and create a new key. Treat this like any other secret. Do not commit it to version control or paste it into workflow JSON.
In the n8n editor, open Credentials from the left sidebar and create a new credential of type Anthropic API. Paste your key and save. n8n stores credentials encrypted in its database. If you are self-hosting, the encryption key comes from your environment configuration.
To verify the connection, create a new workflow with a Manual Trigger node connected to an Anthropic node. Set the model to Claude Sonnet, leave max_tokens at the default, and put a simple prompt like “Reply with the word OK” in the user message field. Run the node. You should see a JSON response with the model’s text output.
If you get a 401 error, the API key is wrong or not being read correctly. If you get a 429, you have hit a rate limit and should add a Wait node or reduce concurrency in the workflow settings.
First working example
Let’s build a workflow that classifies incoming support emails and routes them to the right Slack channel. This is the kind of task Claude handles well and that n8n orchestrates cleanly.
The workflow has four nodes. First, an Email Trigger (IMAP) node that polls a mailbox every minute. Second, an Anthropic node that takes the email subject and body and returns a category. Third, a Switch node that branches on the category. Fourth, four Slack nodes, one per category, that post to the appropriate channel.
In the Anthropic node, set the model to Claude Haiku for speed and cost on this kind of classification task. The system prompt should instruct the model to return exactly one of four labels: billing, technical, account, or other. The user message should be a template that interpolates the email fields.
A practical system prompt looks like this. “You classify support emails into one of four categories: billing, technical, account, other. Respond with only the category name in lowercase, no punctuation, no explanation.”
For the user message, use n8n’s expression syntax to pull from the trigger node. Something like: “Subject: {{$json[“subject”]}}\n\nBody: {{$json[“text”]}}”
Set temperature to 0 for deterministic classification. Set max_tokens low, around 10, since you only need one word back.
The Switch node evaluates the model’s output. Configure four rules matching each category string. Each branch leads to a Slack node configured with the right channel ID and a message template that includes the original subject and the model’s classification.
Run the workflow manually with a test email to verify each branch fires correctly. Then activate it.
Key settings that matter
Model selection is the most consequential dial. Claude Haiku is the cheapest and fastest, suitable for classification, extraction, and short completions. Claude Sonnet is the middle tier and the default for most production work. Claude Opus is the most capable but also the most expensive, typically reserved for complex reasoning, long-context analysis, or tasks where quality matters more than cost.
Temperature controls randomness. Zero gives you the most deterministic output, which matters for classification, extraction, and any task where you want consistent results. Values between 0.3 and 0.7 are typical for creative tasks. Above 0.8 you start getting noticeable variation, which is rarely what you want in production.
Max tokens is your cost ceiling per call. Set it explicitly. The default in the n8n node is usually 4096, which is fine for most tasks but wasteful for classification. For a single-word label, 10 tokens is enough. For a 500-word summary, set it to around 700 to leave room for variance.
System prompts are where you put instructions, constraints, and output format specifications. Be explicit. If you want JSON output, say “respond with valid JSON only, no prose.” If you want a specific schema, give an example. Models follow clear instructions much more reliably than vague ones.
Streaming is supported but rarely useful inside n8n. The platform is built around discrete node executions, not token-by-token UX. Leave streaming off unless you have a specific reason.
Memory and conversation history are not built into the Anthropic node. If you need multi-turn context, you have to manage it yourself by passing the message array through the workflow. For most automation use cases, single-turn calls are the right pattern. Multi-turn belongs in dedicated chat products.
Rate limits depend on your Anthropic tier. The default tier has limits typical for new API accounts, and you can request increases through the console. In n8n, you can throttle a workflow by setting concurrency to 1 in the workflow settings, or by inserting Wait nodes between calls.
Where it shines
Document processing is the strongest use case. You have a stream of PDFs, emails, or support tickets coming in, and you need them tagged, summarized, or extracted into structured fields. Claude handles the messy language understanding, n8n handles the routing and storage. This pattern works well for legal contract review, invoice processing, and customer feedback analysis.
Email triage and routing, like the example above, is a close cousin. The LLM classifies or summarizes, the workflow acts on the result. The same pattern applies to Slack message routing, form submissions, and CRM lead scoring.
Data transformation between systems is another strong fit. You have data in one shape coming from one system and need it in another shape going to another system. The fields do not map cleanly because humans wrote the source data. Claude bridges the gap with field-by-field extraction and normalization.
Multi-step agent workflows with tool use are where things get interesting. Claude can call tools, return structured tool requests, and n8n can execute those tools and feed results back. This requires more wiring than the native node gives you out of the box, but the HTTP Request node handles it. You build a loop where Claude’s tool_use response triggers a downstream node that performs the action and feeds the result back into the next LLM call.
Content generation pipelines work well when the output is structured. Generate product descriptions from a spec sheet,