Resources · n8n integration

n8n Text Classifier nodeConfigure Text Classifier in n8n.

The n8n Text Classifier node reads a piece of text and files it under one of the categories you wrote yourself. Seven parameters shape how it decides, and one port feeds it a chat model. Handy the moment a workflow has to branch on what a message means.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Text Classifier node do in a workflow?

It takes each item that reaches it, hands the text to a language model, and decides which of your categories fits. The categories are not a fixed list shipped by n8n: you write them, with a name and an optional description, and the node builds one output branch per category. An item that lands in the support category leaves through the support branch, and the rest of the workflow can stay simple.

Think of it as an if statement that reads. A router in n8n compares values it can test, so it needs a field that already holds the answer. The classifier works on plain language, which is what arrives when a human writes to you.

Three shapes come back often. Inbound mail: a message pulled by Gmail goes through the classifier with categories like billing, bug and sales, and each branch ends in a different place. Support triage: a ticket body gets a category, the branch posts it in the matching Slack channel, and nobody re-reads the queue by hand. Chat input: a message from a chat trigger is classified before anything else runs, so a question about pricing never reaches the same branch as a bug report.

The node needs a model to think with. You connect one sub-node on its Chat Model port, for example an OpenAI Chat Model or an Anthropic Chat Model, and that sub-node carries the credential, the stored account details n8n reuses across workflows. The classifier itself has nothing to authenticate.

When the category is not the end of the job, look elsewhere. The classifier gives you a branch and stops there. If the workflow has to answer, look things up or call other nodes as tools, the AI Agent node is the root node for that, and the classifier often sits in front of it to decide which agent runs at all.

Known limits, so you are not surprised. Categories exist only in the node: nothing is stored, nothing is learned between runs, and two workflows that classify the same way need the same list twice. An item that matches nothing is dropped unless you turn on the Other branch. And the model provider bills its own API calls under its own terms, whatever n8n does.

Connections

What do you plug into it?

This node is a root node: it receives the workflow items through its main input, and sub-nodes, the small blocks that never run on their own, attach to the ports drawn under it.

Ports (what plugs in)

  • Chat Modelai_languageModelrequired
01Chat ModelThe port that supplies the model doing the reading. Drag a chat model sub-node onto it and the classifier sends each text plus your category list to that model. Leave it empty and the node cannot run at all.

The port that supplies the model doing the reading. Drag a chat model sub-node onto it and the classifier sends each text plus your category list to that model. Leave it empty and the node cannot run at all.

Key parameters

  • Required: the classification happens inside the model, so an empty port blocks the execution.
  • OpenAI Chat Model or Anthropic Chat Model: the usual starting points, each holding its own provider credential.
  • Ollama Chat Model: the choice when the text should stay on your own machine.
  • Google Gemini Chat Model: another hosted option if the account already exists.
Use cases
a support workflow keeps one chat model sub-node for the classifier and reuses the same provider account in the branches that write replies.
Parameters

How do you configure each parameter?

The Text Classifier node has 7 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Text to Classify

inputText

What you see in n8n

Notes & use cases

This is the text the model reads. Everything else in the node describes how to judge it, this field says what gets judged.

Key parameters

  • Text to Classify: required. Use an expression, the n8n syntax that pulls a value from an earlier node, to reference data in previous nodes, or type static text. By default it references the text field.
Use cases
after a chat trigger, point it at {{ $json.chatInput }} so the visitor's own sentence is what gets sorted, not a label someone typed upstream.
02

Categories

categories

What you see in n8n

Notes & use cases

Here you write the buckets. Each entry added with Add Category becomes one output branch on the node, in the order you listed them.

Key parameters

  • Category: required, the name of the category to add. It is also the label printed on the branch.
  • Description: describe your category if it is not obvious, so the model knows what you mean by it.
Use cases
for a shared inbox, three categories are often enough, and the one worth describing is the ambiguous one: a description on billing saying it covers invoices and refunds keeps payment questions out of the sales branch.
03

Allow Multiple Classes To Be True

options.multiClass

What you see in n8n

Notes & use cases

Some texts genuinely belong in two places. This switch decides whether the node is allowed to say so.

Key parameters

  • Allow Multiple Classes To Be True: turned off, the node outputs a single class per item. Turned on, the model can select several, and the item leaves through every branch it matched.
Use cases
a message that reports a bug and asks for a refund should reach both teams, so you turn it on and accept that one email creates two follow-ups. Leave it off whenever a downstream branch writes to a record that must not be touched twice.
04

When No Clear Match

options.fallback

What you see in n8n

Notes & use cases

Not every item fits. This option defines what happens to the ones that match nothing well enough.

Key parameters

  • Discard Item (discard): the default. The item is ignored and dropped from the output, silently.
  • Output on Extra, 'Other' Branch (other): creates a separate output branch called Other, where unmatched items leave.
Use cases
on a support inbox, the default silently loses the odd message nobody categorized, so pick the Other branch and route it to a human. It also doubles as a review queue: whatever piles up there tells you which category is missing from your list.
05

System Prompt Template

options.systemPromptTemplate

What you see in n8n

Notes & use cases

The node already sends the model a set of instructions. This option replaces that text with a string you write yourself.

Key parameters

  • System Prompt Template: a string used directly as the system prompt template. It uses the {categories} placeholder, which is where your category list gets injected.
Use cases
reach for it when the default instructions read the text in the wrong spirit, for instance when you want tone weighted more than topic. Drop the {categories} placeholder from your string and the model never sees the list.
06

Enable Auto-Fixing

options.enableAutoFixing

What you see in n8n

Notes & use cases

A model sometimes answers in a shape the node cannot parse. Auto-fixing gives it a second chance instead of failing the run.

Key parameters

  • Enable Auto-Fixing: when enabled, the node sends the schema parsing error back to the model and asks it to fix the output so it matches the expected format. It may trigger an additional model call.
Use cases
worth turning on for a long overnight batch where one broken output should not stop the workflow. The trade-off is real: that extra call is billed by the provider like any other.
07

Batch Processing

options.batching

What you see in n8n

Notes & use cases

When hundreds of items arrive at once, the pace matters more than the speed. This collection controls it.

Key parameters

  • Batch Size: how many items to process in parallel. Useful for rate limiting, but it might affect the ordering of the log output.
  • Delay Between Batches: a delay in milliseconds between batches, again for rate limiting.
Use cases
classifying a backlog of tickets exported to Google Sheets is exactly where a provider starts refusing calls, so a smaller batch with a delay finishes slower and actually finishes.
Need help

Need help automating Text Classifier with n8n?

A person reads every message.

FAQ

Questions people ask next

01Is the Text Classifier node included in n8n?
Yes. It ships in the n8n AI package, so it is there on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance under the Community Edition and its Sustainable Use licence. There is no install step and no extra cost on the n8n side, whichever way you run it. What you do pay for sits one level down: the chat model you connect belongs to a provider, and that provider bills its own API calls under its own terms. n8n adds nothing on top of them. A workflow built on n8n Cloud behaves the same way once you move it to your own server.
02What do you need to make the n8n Text Classifier node work?
No account, no credential, nothing to authenticate on this node. That is unusual, and it is worth saying plainly: the node has no Authentication selector because it never calls a service directly. What it does need is a model. Connect one chat model sub-node on the Chat Model port, and that sub-node carries the provider credential, meaning the stored account details n8n reuses across workflows. Leave the port empty and the node blocks the execution. Beyond that, you need a Text to Classify value, usually an expression pointing at a field from the previous node, and at least one category.
03What are the limits of the Text Classifier node?
It classifies, and that is all it does. No summary, no rewrite, no reply, no tool call: each item comes out on a branch, unchanged. The categories live in the node and nowhere else, so nothing is remembered from one execution to the next and a second workflow needs its own copy of the list. Version 1 is what the current catalogue exposes, with 7 parameters; an older workflow can show an earlier version with fewer options. Items that match nothing disappear unless you switch When No Clear Match to the Other branch. And the accuracy you get is the accuracy of the model you plugged in.
04What is the minimum you should connect to start?
One chat model sub-node on the Chat Model port, two or three categories with clear names, and a Text to Classify expression pointing at the field that holds the real message. That is a working classifier. For a first build, an OpenAI Chat Model or an Anthropic Chat Model is the shortest path because the account is usually already there; an Ollama Chat Model makes sense when the text should not leave your infrastructure. Add descriptions to the categories only once you see the model hesitate between two of them, and turn on the Other branch early so you can watch what falls through.
05n8n or Make for classifying text?
It depends on where you want the data to sit and how you want to pay. Make is hosted by Make, with no self-hosting option, and it is billed per operation, so a large classification batch is priced by volume. n8n runs on n8n Cloud or on your own server, which matters when the text being classified is customer mail you would rather keep in house, and a self-hosted instance takes the same workflow file as the cloud one. Both build visually. If your automations are few and light, the hosted-only route is simpler; if they grow, control over hosting tends to decide it.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.