- Home
- Resources
- Integrations
- Basic LLM Chain
n8n Basic LLM Chain nodeConfigure Basic LLM Chain in n8n.
One prompt in, one model answer out, and nothing else to wire. The n8n Basic LLM Chain node sends your text to a chat model and hands the reply back to the workflow. It exposes 10 parameters and 2 ports, and it suits anyone who needs an answer rather than an agent that picks its own tools.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Basic LLM Chain node actually do?
The Basic LLM Chain node is a root node: it takes the items arriving on its main input, builds a prompt from them, sends that prompt to the chat model plugged into its port, and returns the model's text. A root node is one that runs inside the workflow itself, while a sub-node is a small node you drag onto one of its ports and that never runs on its own. No tool calling, no loop, no decision.
Think of a support inbox where every message has to be labeled before it reaches a human. One chain, a system message that names the categories, and the reply lands in the item. The model does not need to browse anything, so a chain is enough and the run stays predictable.
Second scenario: product photos that arrive as binary files from a previous step. Set Message Type to imageBinary, point Image Data Field Name at the binary field, and the model returns a description you can push straight into Google Sheets. Third scenario: a daily digest where each item holds a raw note and the chain rewrites it before a Slack message goes out.
Pick the chain over the AI Agent node when the job has one shape and one answer. An agent earns its cost when the model has to choose between several tools or run several turns; a chain does one pass and stops, which makes it cheaper to debug and easier to read six months later. If the answer has to be typed, turn on Require Specific Output Format and attach an output parser rather than reaching for an agent.
The limits are worth knowing before you build on it. The chain holds no memory, so nothing carries over between items or executions. It cannot call a tool, and it will not fetch a page for you. The prompt itself is plain text, so anything dynamic goes in through an expression such as {{ $json.chatInput }}. And the model provider behind the sub-node, whether that is OpenAI or another vendor, bills its own API calls under its own terms; n8n adds nothing on top.
Version 2 of the node is what this page describes. An older workflow may show an earlier version with fewer options, so compare the panel in front of you before hunting for a setting that is not there. If you want the wider picture on the platform first, the n8n review covers where it fits.
What do you plug into the chain?
The chain is the root node; the model and the parser are sub-nodes you drag onto its ports, one type of sub-node per port.
Ports (what plugs in)
- Chat Model
ai_languageModelrequired - Output Parser
ai_outputParseroptional
01Chat Model
This port carries the model that answers the prompt. The chain has no model of its own, so an empty port stops the execution before anything is sent.
Key parameters
- Required: leave it empty and the node cannot run.
- OpenAI Chat Model: the usual starting point when you already hold a key from that provider.
- Ollama Chat Model: for a model running on your own machine, with no call leaving the network.
- Anthropic Chat Model: another hosted option, wired exactly the same way.
02Output Parser
This port shapes the answer instead of letting it come back as loose prose. An output parser is a sub-node that reads the model reply and returns structured fields the rest of the workflow can address.
Key parameters
- Optional: skip it and the chain returns plain text.
- Structured Output Parser: you describe the shape you expect, and the reply comes back in it.
- Auto-fixing Output Parser: wraps another parser and asks the model again when the first answer does not fit.
Which parameters matter in the Basic LLM Chain panel?
The Basic LLM Chain node has 10 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.
Parameters index
Source for Prompt (User Message)
promptTypeWhat you see in n8n
Notes & use cases
This selector decides where the prompt text comes from, and it is the first thing to set on a fresh node.
Key parameters
- Connected Chat Trigger Node (
auto): looks for an input field calledchatInputcoming from a directly connected Chat Trigger. - Define below (
define): use an expression to reference data in previous nodes, or type static text. - Prompt (User Message) (
text): the required field that appears with the second option and holds the prompt itself.
define, with {{ $json.body }} in the text field. The no prompt specified error on auto means the incoming data has no chatInput field; an Edit Fields (Set) node renaming it solves the case.Require Specific Output Format
hasOutputParserWhat you see in n8n
Notes & use cases
Flip this switch and the node exposes the output parser port, so the reply comes back shaped rather than as a paragraph.
Key parameters
- Require Specific Output Format (
hasOutputParser): a boolean, off until you need typed output.
Enable Fallback Model
needsFallbackWhat you see in n8n
Notes & use cases
Turning this on tells the chain to keep a second model in reserve instead of failing on the first refusal.
Key parameters
- Enable Fallback Model (
needsFallback): a boolean, off by default.
Type Name or ID
messages.typeWhat you see in n8n
Notes & use cases
Inside Chat Messages, this selector says whose voice a message speaks in. n8n ignores these options when no chat model is connected.
Key parameters
- System (
SystemMessagePromptTemplate): the instruction that guides what the model should do, tone included. - User (
HumanMessagePromptTemplate): a sample user input. - AI (
AIMessagePromptTemplate): a sample expected response the model tries to imitate.
Message Type
messages.messageTypeWhat you see in n8n
Notes & use cases
This one appears on a User message and says what the model receives: words, or an image to look at.
Key parameters
- Text (
text): a simple text message. - Image (Binary) (
imageBinary): processes the binary input coming from the previous node. - Image (URL) (
imageUrl): processes the image at the address you give.
imageBinary right after the node that downloaded the file, with no storage step in between.Image Data Field Name
messages.binaryImageDataKeyWhat you see in n8n
Notes & use cases
When the image arrives as a binary file, the chain needs to know which field holds it, and this is where you say so.
Key parameters
- Image Data Field Name (
binaryImageDataKey): required, the name of the field in the chain's input that contains the binary image file to be processed.
Image URL
messages.imageUrlWhat you see in n8n
Notes & use cases
The other way to hand an image over: give the address and let the model fetch what it needs.
Key parameters
- Image URL (
imageUrl): required, the URL to the image to be processed.
{{ $json.imageUrl }} and no file is ever downloaded into n8n. If the address is private or expires, the binary route is the safer one.Image Details
messages.imageDetailWhat you see in n8n
Notes & use cases
This setting controls how the model processes the image and generates its textual understanding, and it moves the token budget with it. A token is the unit a model counts its input in.
Key parameters
- Auto (
auto): looks at the image input size and decides between the low and high setting. - Low (
low): a 512px x 512px version, a budget of 65 tokens, faster responses and fewer input tokens. - High (
high): detailed 512px crops, each one twice the budget, for a total of 129 tokens.
low; reading small print on a label is what high is for.Message
messages.messageWhat you see in n8n
Notes & use cases
This is the text of the chat message itself, and what it means depends on the type you picked just above it.
Key parameters
- Message (
message): required, the content of that message.
Always respond talking like a pirate is enough to fix the tone for every item. On an AI message, the same field holds a sample expected response, and the model tries to answer the same way.Batch Processing
batchingWhat you see in n8n
Notes & use cases
A collection of batch processing options for rate limiting, useful the day a workflow stops receiving answers because it asked for too many at once.
Key parameters
- Batch Size (
batchSize): how many items to process in parallel, which is useful for rate limiting but might impact the log output ordering. - Delay Between Batches (
delayBetweenBatches): a delay in milliseconds between batches, also for rate limiting.
Need help automating Basic LLM Chain with n8n?
A person reads every message.
Basic LLM Chain questions, answered
01Is the Basic LLM Chain node free in n8n?
02What credentials does the Basic LLM Chain node need?
03What are the limits of the n8n Basic LLM Chain node?
04Basic LLM Chain or AI Agent: which one should you use?
05n8n or Make for running an LLM prompt?
Get our weekly integration tips.
No spam. Unsubscribe anytime.


