Steps
How we tested, and what is real
On 25 October 2026 we ran 30 executions on n8n 2.43.7 with
n8n execute: the Text Classifier node (version 1.1, one test on version 1) with the OpenAI Chat Model sub-node (version 1.3), categories Billing, Support and Sales. To get the exact odd replies models sometimes give (all false, two trues, lowercase keys, prose), we pointed the OpenAI credential's Base URL at a small local stand-in that returns fixed replies and logs every request. So the model's replies are scripted and no real model was called; n8n's prompts, parsing, routing and error texts are real.Item missing from every branch? That is the default
When the model says no category matches, the default When No Clear Match setting is Discard Item. The node shows success and the item simply disappears: no branch, no error. If you need to see those items, open Options > When No Clear Match and choose Output on Extra 'Other' Branch, then connect the new Other output.
The Other branch needs a "fallback" key from the model
With the Other branch on, n8n expects the model to add a
fallbackkey to its reply. When our scripted reply said false to every category but leftfallbackout, the node failed withModel output doesn't fit required format. With"fallback": truethe item went to Other. If this error appears only after you enabled the Other branch, the model is skipping that key; add Enable Auto-Fixing (next steps) or mention it in the System Prompt Template.One item on two branches: "mutually exclusive" is only a prompt
By default the prompt asks the model to pick one category, but nothing enforces it. A reply with Billing and Support both
truesent the same item down both branches, so everything after them ran twice (two emails, two tickets). Allow Multiple Classes on or off made no difference in our runs. If the branches must be exclusive, add an If or Switch after the node that checks the fields, or merge the branches and keep one."Model output doesn't fit required format": keys must match exactly
The reply has to be a JSON object with one
true/falsekey per category, spelled exactly like your category names. LowercasebillingforBilling,"true"as text, a missing category, a{"category": "Billing"}shape, prose, or a category namedBilling questionanswered asBillingall gave the same one-line error, which never says which. Use short, simple category names, and put the details in each category's description.Enable Auto-Fixing is off until you add it
The node can ask the model to repair a bad reply, but the option starts off: add Options > Enable Auto-Fixing. In our runs it repaired lowercase keys, prose and code fences with one extra model call each, so those items cost two calls. If the repaired reply is still wrong, you get the same format error.
Many items: parallel calls, and one bad item stops all
Version 1.1 sends up to 5 items to the model at once (batch size 5). With 3 items, all 3 calls fired in the same second and were billed, then one bad reply failed the whole node and no item reached any branch. Version 1 (one by one) failed the same way. With Settings > On Error > Continue (regular output), the good items go through, but the error item is put on the first category branch, next to real results: filter on
{{ $json.error }}there, or use Continue (using error output), which kept it off that branch in our test.Credential errors: read the second line
A wrong key showed
Authorization failed - please check your credentials, and an account with no credits showedThe service is receiving too many requests from you, which looks like a rate limit but is billing. The real reason from the provider (401 Incorrect API key, the quota message) is on the next line of the error. An empty Text field fails before any call withText to classify for item 0 is not defined.
All test results
We ran 30 executions; some rows group several. Left: what we set up or what the model replied (scripted by our stand-in, see the first step). Right: what n8n did (real).
| Test | Result |
|---|---|
Categories Billing, Support, Sales; model replies {"Billing": true, "Support": false, "Sales": false} | Worked: the item went out on the Billing branch. One model call |
Same reply inside a ```json code fence | Worked, no fix call needed |
Model answers all categories false, default When No Clear Match = Discard Item | Node succeeded and the item came out on no branch: silently gone |
Same with When No Clear Match = Output on Extra 'Other' Branch, reply without a fallback key | Model output doesn't fit required format (2 runs) |
Same, reply with "fallback": true | Worked: item on the Other branch |
Reply with Billing and Support true, Allow Multiple Classes off (default) | The same item went down both branches; the downstream nodes ran twice |
| Same with Allow Multiple Classes on | Same result: both branches |
Lowercase keys ("billing"), "true" as text, a missing category key, {"category": "Billing"}, or plain prose | All failed with the same top line: Model output doesn't fit required format |
Category named Billing question, model replies with key Billing | Model output doesn't fit required format |
| Extra unknown key in the reply | Ignored; the run passed |
| Options > Enable Auto-Fixing added, replies with lowercase keys, prose, or a code fence | Fixed by one extra model call each (2 calls billed) |
| Auto-fixing on, fix reply still invalid | Model output doesn't fit required format |
| Text expression empty | Text to classify for item 0 is not defined (items count from 0) |
| No categories defined | At least one category must be defined |
| Wrong API key | Authorization failed - please check your credentials; 401 Incorrect API key provided on the next line |
No credits (429 insufficient_quota) | The service is receiving too many requests from you; the quota reason on the next line |
| 3 items (good, prose, all-false), version 1.1, default batch size 5 | All 3 model calls fired in the same second (all billed), then the bad item failed the whole node: no item reached any branch |
| Same items on node version 1 (sequential) | Also failed on the bad item |
| Same, Settings > On Error > Continue (regular output) | Good item on Billing, but the error item {"error": "Model output doesn't fit required format"} was put on the first category branch (Billing) too; the all-false item was still dropped |
| Same, On Error > Continue (using error output) | The error item went to the error output, not to Billing |
Checklist
- Items vanishing: set When No Clear Match to Output on Extra 'Other' Branch.
- Other branch on and format errors: the model must also return a
fallbackkey. - Expect one item on two branches sometimes; guard the downstream steps.
- Keep category names short and exact; the reply keys must match them letter for letter.
- Add Options > Enable Auto-Fixing; each repaired item costs one more call.
- On Error: Continue (using error output), or filter
$json.erroron the first branch. - Read the second line of credential errors: that is the provider's real reason.
Good to know
- Summarizing long text with a model instead? See n8n Summarization Chain not working (output keys, prompt braces, call count).
- Need values pulled out of the text instead of a category? See n8n Information Extractor not working.
- Free-form JSON from a chain or agent is covered in n8n Structured Output Parser not working.
- Routing on fields without a model? See n8n Switch node not working.
- Quota, key and Base URL errors from OpenAI are in n8n OpenAI node not working; pacing in n8n 429 rate limits.
- Every error text from our n8n guides is in the n8n error message index.
What we did not test
The real api.openai.com or other providers such as Anthropic and Gemini (all replies came from our stand-in), other chat model sub-nodes, edits to the System Prompt Template, the batch delay option, very long texts, and n8n Cloud. In our runs the category descriptions were sent only inside the JSON schema, not in the system prompt, and the format instructions contained doubled braces {{ }}; we did not see either cause a failure.
Start from a working agent
FAQ
Why does the n8n Text Classifier drop items?
By default When No Clear Match is set to Discard Item, so when the model says no category fits, the item leaves on no branch and the node still shows success. Switch it to Output on Extra Other Branch.
What does "Model output doesn't fit required format" mean in the Text Classifier?
The model reply was not a JSON object with exactly one true/false key per category name. Lowercase keys, text instead of booleans, prose or a missing fallback key with the Other branch on all cause it.
Why does one item go to two branches in the n8n Text Classifier?
The one-category rule is only in the prompt. If the model marks two categories true, n8n sends the item down both branches, even with Allow Multiple Classes off.
How do I turn on auto-fixing in the Text Classifier?
Add Enable Auto-Fixing under Options. It is off by default. Each repaired reply costs one extra model call.
What does "Text to classify for item 0 is not defined" mean?
The Text expression is empty for that item, counting from 0. Check the field name in the input panel.
Why does my error item show up on the first branch?
With On Error set to Continue (regular output), n8n puts the error item on the first category output. Use Continue (using error output) or filter on the error field.
Related guides
- n8n Information Extractor not working? 27 tests, every error decoded
- n8n Basic LLM Chain not working? 25 tests, every error decoded
- n8n "Model output doesn't fit required format": 35 tests, fixed
- n8n Summarization Chain not working? 24 tests, every error decoded
- n8n Merge node not working after an IF? 31 tests of what really happens
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes