- Home
- Resources
- Integrations
- Sentiment Analysis
n8n Sentiment Analysis nodeConfigure Sentiment Analysis in n8n.
Sentiment scoring becomes a branch in your workflow, not a script you maintain. The n8n Sentiment Analysis node reads one field of each incoming item, asks a chat model to classify it, and sends the item down the output matching its category. Six parameters, one required model port, nothing to authenticate.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Sentiment Analysis node actually do?
The Sentiment Analysis node is a root node: it takes the items arriving on its main input, reads the text you point it at, and hands that text to a chat model connected on its port. A port is the small connector under the node where a sub-node plugs in, and a sub-node is a helper node that never runs on its own. The output is one branch per sentiment category, so the routing happens inside the node instead of in a chain of If nodes downstream.
Take a support inbox. Messages land in the workflow, Text to Analyze points at the body of each one with an expression such as {{ $json.text }}, and the node splits them into a branch that goes straight to a Slack channel for the angry ones and a branch that quietly logs the rest. An expression is the {{ }} syntax n8n uses to pull a value out of the item it is processing.
Take feedback collection instead. A form or a scraped page fills a sheet, the node classifies each row, and the result goes back into Google Sheets next to the original text. Turn on Include Detailed Results and each row also carries the strength and confidence the model estimated, which is enough to sort a backlog even though those scores are rough indicators rather than precise measurements.
Third case: an escalation rule. Negative items trigger a draft reply through Gmail while everything else stops. Custom Sentiment Categories make that rule sharper, because five levels separate a mild complaint from a customer about to leave.
When should you reach for something else? If the decision is about topic rather than tone, classification belongs elsewhere. If the task needs several steps, tool calls or a conversation, an AI Agent is the root node to pick, and this node stays for the single question it answers well. The sentiment node has one job and no memory of previous items.
The known limits are worth stating plainly. Accuracy depends on the chat model you plug in and on the language of the text, so a model that handles your input language matters more than any option on the node. Output format can drift, which is what Enable Auto-Fixing exists for, at the cost of an extra model call. Large volumes are better split into smaller chunks, and Batch Processing is there to keep the provider from rate limiting you. Providers such as OpenAI or Anthropic bill their own API calls; n8n adds nothing on top.
What do you plug into the node?
Root node on the main input, sub-nodes underneath: the Sentiment Analysis node does the routing, and a chat model does the reading. A chat model is the sub-node that carries the provider credential and answers the prompt.
Ports (what plugs in)
- Chat Model
ai_languageModelrequired
01Chat Model
This port feeds the node the model that classifies each piece of text. Leave it empty and the node cannot run at all, since nothing is there to produce a category.
Key parameters
- Required: the node refuses to execute without a model connected here.
- OpenAI Chat Model: the usual starting point when you already have a key for that provider.
- Anthropic Chat Model or Google Gemini Chat Model: same port, different provider, swapped by dragging a different sub-node onto it.
- Ollama Chat Model: the option when the text should never leave your own infrastructure.
Which parameter does what?
The Sentiment Analysis node has 6 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.
Parameters index
Text to Analyze
inputTextWhat you see in n8n
Notes & use cases
This is the only required field of the node. It tells the node which piece of text to classify, either as static text or as a reference to data coming from a previous node.
Key parameters
- Text to Analyze: a string, most often an expression such as
{{ $json.chatInput }}when the item comes from a chat or message source. By default the node expects atextfield.
{{ $json.content }} classifies the body of a blog post or an article pulled by a feed, while a message workflow points at whatever field carries the customer's words.Sentiment Categories
options.categoriesWhat you see in n8n
Notes & use cases
Categories define the answers the model is allowed to give, and they also define the outputs of the node. Change them and the branches under the node change with them.
Key parameters
- Sentiment Categories: a comma-separated list. The default is
Positive, Neutral, Negative, and a finer scale such asVery Positive, Positive, Neutral, Negative, Very Negativeworks just as well.
Excited, Happy, Neutral, Disappointed, Angry gives five outputs to wire separately. Remember to rewire the workflow after changing the list, since the old branches no longer match.System Prompt Template
options.systemPromptTemplateWhat you see in n8n
Notes & use cases
Here you replace the instructions the node sends to the model instead of accepting the built-in ones. It is the lever to pull when results are technically valid but not what the business means by negative.
Key parameters
- System Prompt Template: a string used directly as the system prompt template. It relies on the
{categories}placeholder to inject your list of categories.
Include Detailed Results
options.includeDetailedResultsWhat you see in n8n
Notes & use cases
Turned on, the node enriches each item with more than its category, which is what you want when a human reads the output afterward.
Key parameters
- Include Detailed Results: a boolean that adds sentiment strength and confidence scores to the output. Those numbers come from the language model and are rough indicators, not measurements.
Enable Auto-Fixing
options.enableAutoFixingWhat you see in n8n
Notes & use cases
Models sometimes answer in a shape the node cannot read. This switch handles that case instead of letting the execution fail.
Key parameters
- Enable Auto-Fixing: a boolean. When the output is broken, the parsing error goes back to the model with a request to fix it, which may trigger an additional model call.
Batch Processing
options.batchingWhat you see in n8n
Notes & use cases
This collection controls the pace at which items reach the model, which matters as soon as a run carries more than a handful of texts.
Key parameters
- Batch Size: how many items get processed in parallel. Useful for rate limiting, though it might affect the ordering of the log output.
- Delay Between Batches: a delay in milliseconds between batches, again for rate limiting.
2000 milliseconds turns a failing run into a slow but complete one.Need help automating Sentiment Analysis with n8n?
A person reads every message.
Sentiment Analysis and n8n, the questions that come next
01Is the Sentiment Analysis node included in n8n?
02What credentials does the n8n Sentiment Analysis node need?
03What are the limits of the node?
04Sentiment Analysis node or AI Agent, which one should you connect?
05n8n or Make for sentiment analysis?
Get our weekly integration tips.
No spam. Unsubscribe anytime.

