- Home
- Resources
- Integrations
- Anthropic
n8n Anthropic nodeConfigure Anthropic in n8n.
The n8n Anthropic node puts Claude models inside a workflow, as a regular step and not a chat window. It ships 10 operations across 5 resources: send a message, analyze a document or an image, upload and list files, rework a prompt. It runs on each incoming item and needs one credential.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Anthropic node actually do?
The n8n Anthropic node calls the Anthropic API from inside a workflow. You pick a resource (Text, Document, Image, File or Prompt), pick an operation, point the node at a model, and the answer comes back as regular workflow data that the next node can read. Nothing in it is conversational: it takes the items arriving on its input, processes them one by one, and passes the result along.
Three shapes of work cover most of what people build with it. The first is drafting text at scale: text.message takes a system message and a prompt, returns a completion, and the next node writes it somewhere. A spreadsheet of leads goes through Google Sheets, each row gets a personalized paragraph, and Gmail sends it. The workflow stays a straight line, which makes it easy to rerun on a single row when something looks off.
The second is reading files the workflow already carries. An email arrives with a PDF attached, the binary data moves down the chain, and document.analyze answers a question about it: what the invoice total is, which clause changed, whether the form is complete. image.analyze does the same with images. Both accept either a URL or a binary field, so you choose depending on where the file lives.
The third is prompt work. prompt.generate, prompt.improve and prompt.templatize exist to build and clean up prompts rather than to answer a question. They are useful once a workflow has a prompt that half works and you want a version with variables in it, or a rewritten version based on written feedback.
When to reach for something else: this node runs as an action on each item, and it has no sub-node ports, so it cannot host a memory or a set of tools. If the workflow needs a model that decides which tool to call, that belongs to the AI Agent instead, with a chat model sub-node wired to it. A sub-node is a small node that never runs alone: it plugs into a port of a root node and only works through it. If the job is simply to compare providers on the same prompt, the OpenAI node has the same kind of action shape.
The known limits are worth stating up front. The node covers documents, files, images, prompts and text completions, and nothing beyond that list of 10 operations. File operations address the Anthropic Files API only, so a file uploaded here is not a file sitting in your storage. And the model provider bills its own API calls under its own terms, whatever n8n does. If you want the wider picture on the platform before committing, the n8n review covers it.
What do you need to authenticate?
- 01
Create the Anthropic credential
Open the Credentials menu in n8n and add an Anthropic credential. A credential is a stored set of secrets that n8n keeps outside the workflow, so the key never sits in a node parameter where a shared workflow would leak it. You create it once and every workflow on that instance can select it afterwards, which is what you want as soon as more than one automation calls the same account.
- 02
Pick your key or use Gateway credits
The normal route is your own Anthropic API key, which means an Anthropic account and the billing attached to it. On n8n Cloud there is a second route: select Use Gateway credits in the node's credential field and the node runs on Gateway credits instead of your own key, with no Anthropic account needed. Self-hosted instances do not get that option, so plan on a key there.
- 03
Select the credential in the node
Back in the node, choose the credential you just created, then set the resource and the operation. On
text.message,document.analyzeandimage.analyze, the Model field is required and the node refuses to run while it is empty. Everything else is optional at the schema level, which does not mean the operation is useful without it: a message with no prompt content will not get you far.
What can the Anthropic node do, operation by operation?
The Anthropic node exposes 10 operations across 5 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Get File Metadata | Analyze Document | Delete File | Generate Prompt | Improve Prompt | List Files | Message a Model | Templatize Prompt | Upload File |
|---|---|---|---|---|---|---|---|---|---|
| Document | ✓ | ||||||||
| File | ✓ | ✓ | ✓ | ✓ | |||||
| Image | ✓ | ||||||||
| Prompt | ✓ | ✓ | ✓ | ||||||
| Text | ✓ |
Operations index
Document
1 operationAnalyze document
document.analyzeWhat you see in n8n
Notes & use cases
Hand one or more documents to a Claude model and get a written answer about their content, returned as workflow data the next node can read.
Key parameters
- Model: required, the model that reads the document; the node will not run while it is empty.
- Text Input: the question asked about the document, for example
What's in this document?. - Input Type:
urlfor Document URL(s),binaryfor Binary File(s) already carried by the workflow. - URL(s) or Input Data Field Name(s): the addresses, comma separated, or the binary field names holding the documents.
File
4 operationsUpload a file
file.uploadWhat you see in n8n
Notes & use cases
Pushes a single file to the Anthropic API so later runs can point at it instead of resending the content every time.
Key parameters
- Input Type:
urlto fetch the file from a File URL,binaryto take a Binary File from the current item. - URL: the address of the file to upload, when the input type is a URL.
- Input Data Field Name: the name of the binary field holding the file, typically
dataafter a download or an email attachment step. - File Name: in Options, the name given to the uploaded file, which is what you will recognize later in a listing.
Get file metadata
file.getWhat you see in n8n
Notes & use cases
Reads back what the Anthropic API knows about one uploaded file, without touching its content.
Key parameters
- File ID: the identifier of the file to get metadata for, in the
file_123shape, most often taken from a previous step with{{ $json.id }}. An expression like this reads a field of the current item at run time instead of a value typed by hand.
List files
file.listWhat you see in n8n
Notes & use cases
Returns the files held by the Anthropic API, one item per file, which makes it the starting point of any housekeeping workflow.
Key parameters
- Return All: on, n8n keeps paging until the whole list is out; off, it stops at Limit. Paging means the API hands back the list in slices and n8n asks for the next one.
- Limit: the maximum number of files to return when Return All is off, which is the setting to keep while testing so a run stays cheap and short.
Delete a file
file.deleteFileWhat you see in n8n
Notes & use cases
Removes one file from the Anthropic API for good, which is the operation you put behind a filter rather than at the top of a workflow.
Key parameters
- File ID: the identifier of the file to delete, usually piped from a listing step as
{{ $json.id }}so the deletion targets exactly what the previous node selected.
Image
1 operationAnalyze image
image.analyzeWhat you see in n8n
Notes & use cases
Sends images to a Claude model with a question attached, and returns the description or the answer as text in the item.
Key parameters
- Model: required, the model doing the reading.
- Text Input: what you want to know, for example
What's in this image?. - URL(s): image addresses, several allowed when separated by commas.
- Length of Description (Max Tokens): in Options, fewer tokens give a shorter, less detailed description. A token is the unit a model counts in, roughly a word fragment.
Prompt
3 operationsGenerate a prompt
prompt.generateWhat you see in n8n
Notes & use cases
Turns a short description of an intention into a full prompt, so you are not staring at an empty prompt field.
Key parameters
- Task: the description of the prompt's purpose, written plainly, for example
A chef for a meal prep planning service. - Simplify Output: on, the node returns a simplified response rather than the raw data, which keeps the next node's field mapping readable.
Improve a prompt
prompt.improveWhat you see in n8n
Notes & use cases
Takes a prompt that already exists and returns a reworked version, guided by what you say is wrong with it.
Key parameters
- Messages: the messages that make up the prompt to improve, added one by one with Add Message.
- Prompt and Role: the content of each message and who sends it,
userto ask,assistantto set a tone or a personality. - System Message: the existing system prompt to incorporate, if there is one.
- Feedback: what should change, such as
Make it more detailed and include cooking times.
Templatize a prompt
prompt.templatizeWhat you see in n8n
Notes & use cases
Converts a fixed prompt into a template with variables, which is what you want before running the same instruction over hundreds of rows.
Key parameters
- Messages: the messages that constitute the prompt to be templatized.
- Prompt: the content of the message to send, for example
Translate hello to German. - System Message: the existing system prompt to templatize, such as
You are a professional English to German translator.
Text
1 operationMessage a model
text.messageWhat you see in n8n
Notes & use cases
The main operation: it creates a completion with an Anthropic model and hands the text back to the workflow.
Key parameters
- Model: required, and the one field the node blocks on.
- Messages, Prompt, Role and System Message: the conversation you send, with the system message setting the behavior once.
- Web Search and Web Search Allowed Domains: enable search, then restrict it to a comma-separated domain list. It conflicts with Web Search Blocked Domains, so pick one side.
- Output Randomness (Temperature): lower it and completions get less random, close to zero they become deterministic and repetitive.
Need help automating Anthropic with n8n?
A person reads every message.
Anthropic and n8n: the questions that come next
01Is the Anthropic node included in n8n, on Cloud and self-hosted?
02What credentials does the n8n Anthropic node need?
03What are the limits of the Anthropic node?
04What do you need to plug in to make it run?
05n8n or Make for calling Claude models?
Get our weekly integration tips.
No spam. Unsubscribe anytime.