Stepthrough Start free

What is the Structured Output Parser in n8n?

Quick answer

The Structured Output Parser is an n8n sub-node you attach to an AI step, such as a Basic LLM Chain or an AI Agent with Require Specific Output Format turned on. You give it a JSON example or a JSON Schema, and it turns the model's answer into JSON with exactly those fields, so later nodes can map them reliably.

Last updated

Take the free module →Module 12 of the free AI for Operations Teams course, about 15 minutes. No account needed.

Updated · By Robert Breen

Why it matters for a small business

AI models answer in prose by default, and prose is hard to put in a spreadsheet. Even when you ask for JSON, the wording or field names can drift between runs. The parser fixes the shape, so every run returns, say, vendor, date and total, in that form, and the Google Sheets step never meets a surprise.

It also fails loudly. If the model's answer does not fit the shape, the parser raises an error instead of passing on half-right data, which your error handling can catch. That is much better than a wrong total quietly landing in the books.

Where you'll use it: on an AI Agent node, turn on Require Specific Output Format, then click the output parser connector and add Structured Output Parser. Choose Generate From JSON Example and paste a sample, or Define using JSON Schema. The node's output then shows your fields under output.

In a real lesson: n8n: Turn Meeting Notes into Action Items in a Google Sheet

In the free n8n Meeting Notes to Action Items lesson, Meridian Accounting Group gets fixed-shape answers a simpler way: the OpenAI node's prompt asks for a list called tasks, each with task, owner and due, and you set the response format to JSON Object.

The Structured Output Parser is the next step up when you use an AI Agent or chain instead. With a JSON example of one tasks list attached, every answer is checked against that shape before the Split Out node turns it into rows.

Try this lesson free or read the step-by-step guide.

Common confusions

Parser vs JSON mode

JSON mode asks the model to return valid JSON. The parser also checks the JSON has the exact fields you need.

Parser vs structured output

Structured output is the idea. The parser is n8n's node for getting it from chains and agents.

Tips

  • Keep the example small and use realistic values.
  • Describe each field in the prompt as well, so the model knows what goes where.
  • Test with a messy input to see how the parser fails.

More AI agents terms

Where you use it: free lessons

Frequently asked questions

Do I need the parser if I use the OpenAI node's JSON format?
Not always. For a simple OpenAI step, JSON mode and a clear prompt are often enough. Use the parser with chains and agents, or when the shape must be exact.
Can the parser return a list?
Yes. Put an array in the example or schema, such as a list of tasks, and the parser returns it.

All AI glossary terms, A to Z · Free prompt templates