Resources · n8n integration

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

Why automate

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.

Connect

What do you need to authenticate?

  1. 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.

  2. 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.

  3. 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.analyze and image.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.

Actions

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.

Resources × operations matrix
ResourceGet File MetadataAnalyze DocumentDelete FileGenerate PromptImprove PromptList FilesMessage a ModelTemplatize PromptUpload File
Document
File
Image
Prompt
Text

Document

1 operation
01

Analyze document

document.analyze

What 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: url for Document URL(s), binary for 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.
Use cases
a supplier PDF arrives by email and the workflow asks for the total and the due date before writing them to a sheet.

File

4 operations
02

Upload a file

file.upload

What 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: url to fetch the file from a File URL, binary to 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 data after 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.
Use cases
a reference contract gets uploaded once, then every later run refers to it.
03

Get file metadata

file.get

What 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_123 shape, 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.
Use cases
before a nightly cleanup, the workflow checks each stored identifier and routes the ones that no longer resolve to a Slack alert.
04

List files

file.list

What 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.
Use cases
a weekly run lists everything uploaded, writes it to a sheet, and gives the team something to review.
05

Delete a file

file.deleteFile

What 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.
Use cases
after a monthly retention check, files older than the window get deleted one by one, with the listing step feeding the loop.

Image

1 operation
06

Analyze image

image.analyze

What 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.
Use cases
product photos coming out of a shared drive get a caption each, ready for a catalog page.

Prompt

3 operations
07

Generate a prompt

prompt.generate

What 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.
Use cases
a build session starts here, the generated prompt gets pasted into a message step, and the rest of the workflow is wired around it.
08

Improve a prompt

prompt.improve

What 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, user to ask, assistant to 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.
Use cases
a prompt that keeps returning vague answers goes through this step with written feedback before being put back into production.
09

Templatize a prompt

prompt.templatize

What 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.
Use cases
a one-off translation instruction becomes a template whose variable is filled per row, and the message step then reads it with an expression.

Text

1 operation
10

Message a model

text.message

What 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.
Use cases
each row of a lead list gets its own opening paragraph before the sending step picks it up.
Need help

Need help automating Anthropic with n8n?

A person reads every message.

FAQ

Anthropic and n8n: the questions that come next

01Is the Anthropic node included in n8n, on Cloud and self-hosted?
Yes. The node belongs to the n8n AI package, @n8n/n8n-nodes-langchain, which ships with n8n. There is nothing to install and n8n charges nothing extra for it, whether you run n8n Cloud, the hosted offer, or your own instance via Docker or npm under the Community Edition and its Sustainable Use license. A workflow behaves the same way in both places. What is not free is the model side: the provider bills its own API calls under its own terms, and n8n adds nothing on top of that.
02What credentials does the n8n Anthropic node need?
One Anthropic credential, created once in the Credentials menu and then selectable from every workflow on that instance. The standard setup is your own Anthropic API key. On n8n Cloud you have an alternative: select Use Gateway credits in the node's credential field and the node runs on Gateway credits without an Anthropic account at all. The node itself has no Authentication selector, so there is no auth method to choose beyond that credential field. Set the credential before the Model field, since Model is required on the message, document and image operations.
03What are the limits of the Anthropic node?
The node covers 10 operations across 5 resources, and nothing outside that list. It has no sub-node ports, meaning you cannot wire a memory or a set of tools into it the way you would with a root AI node. Its file operations work against the Anthropic Files API, so an uploaded file lives there and not in your own storage. Some options carry their own conditions: Code Execution is not supported by all models, and the two web search domain lists conflict with each other. The page describes version 1 of the node, so an older workflow may show fewer options.
04What do you need to plug in to make it run?
Less than most AI nodes, which is the point of this one. It runs as a plain action node on each incoming item, so there is no chat model sub-node to connect and no port to fill. What it needs is the credential and a model chosen in the Model field. To start simple, take the Text resource and the Message a Model operation, put your instruction in System Message and your content in Prompt, and look at the output before adding options. If you need a model that picks its own tools, that is the AI Agent node instead, not this one.
05n8n or Make for calling Claude models?
It depends on three things. Hosting: n8n runs on your own servers via Docker or npm, or on n8n Cloud; Make is hosted only. Data control follows from that, since a self-hosted instance keeps documents and images on infrastructure you own, which matters when the files are contracts or customer records. Cost model: Make bills per operation, so a workflow that loops over a long file list is priced differently on each platform. Visual logic: both are visual builders, and the honest test is to rebuild one real workflow on each and see which one you can debug faster.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.