Resources · n8n integration

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

Why automate

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.

Connections

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 Modelai_languageModelrequired
01Chat ModelThis 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.

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.
Use cases
classifying customer messages in several languages works best with a model that supports those languages, so the choice of sub-node is part of the setup, not a detail.
Parameters

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.

01

Text to Analyze

inputText

What 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 a text field.
Use cases
pointing at {{ $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.
02

Sentiment Categories

options.categories

What 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 as Very Positive, Positive, Neutral, Negative, Very Negative works just as well.
Use cases
for customer feedback, an emotional scale like 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.
03

System Prompt Template

options.systemPromptTemplate

What 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.
Use cases
a template that tells the model to judge only the tone toward the product, ignoring complaints about delivery, keeps a review pipeline consistent. Expect to refine it a few times on real items.
04

Include Detailed Results

options.includeDetailedResults

What 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.
Use cases
a weekly digest that lists the strongest negative items first needs this switch on, because the category alone gives no way to rank two complaints against each other.
05

Enable Auto-Fixing

options.enableAutoFixing

What 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.
Use cases
on a long unattended run, the extra call costs less than a failed execution at three in the morning. On a strict budget with a model that already returns clean output, leaving it off keeps the number of calls predictable.
06

Batch Processing

options.batching

What 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.
Use cases
importing a month of reviews in one run tends to hit provider limits; a smaller batch size with a delay of 2000 milliseconds turns a failing run into a slow but complete one.
Need help

Need help automating Sentiment Analysis with n8n?

A person reads every message.

FAQ

Sentiment Analysis and n8n, the questions that come next

01Is the Sentiment Analysis node included in n8n?
Yes. It ships in the n8n AI package, the one bundled with n8n itself, so there is nothing to install on n8n Cloud or on a self-hosted instance running the Community Edition under the Sustainable Use license. The workflow behaves the same in both cases. n8n charges nothing extra for the node. What does have a cost is the model behind it: the provider of the chat model you connect bills its own API calls according to its own terms, and the node makes one call per item, plus an extra one when auto-fixing kicks in on a broken output.
02What credentials does the n8n Sentiment Analysis node need?
None on the node itself. There is no credential field and no Authentication selector to fill in, which is unusual enough to be worth saying out loud. The authentication lives one level down, on the chat model sub-node you connect to the Chat Model port: that sub-node carries the provider key. So the setup is two steps rather than three. Drag a chat model under the node, fill its credential once, and it can be reused by every other AI node in your instance. The sentiment node then needs only its Text to Analyze field.
03What are the limits of the node?
The node does one thing: it classifies a single piece of text into one of your categories and routes the item accordingly. It keeps no memory between items, so nothing carries over from the previous message. Quality depends on the connected model and on the language of the text, and a model that does not handle that language will classify badly whatever the options say. The strength and confidence scores are model estimates, not measurements. For large volumes, splitting the input into smaller chunks and setting Batch Processing is the practical approach. The page describes version 1 of the node.
04Sentiment Analysis node or AI Agent, which one should you connect?
Pick the Sentiment Analysis node when the question is a single classification and the answer should route the item. Pick an AI Agent when the work needs several steps, tool calls or a back and forth. At minimum, this node needs one thing plugged in: a chat model on its required port. To get started, an OpenAI Chat Model or an Anthropic Chat Model with a temperature set to 0, or very close to it, is the recommended setup, because a low temperature keeps results consistent from one run to the next.
05n8n or Make for sentiment analysis?
It depends on where your data has to live. n8n runs on your own servers through Docker or npm, or on n8n Cloud, and a workflow is identical in both cases, so text that must not leave your infrastructure can be classified by a local model. Make is hosted only, with no self-hosting option, and bills per operation, which changes the arithmetic when a run classifies thousands of items. Both give you a visual canvas. The deciding factors are hosting, data control and the cost model, not the node itself.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.