All nodes/AI/LLM
Structured Output LLM
Calls an LLM and returns the response strictly in JSON format according to a given schema (structured output). Used when you need typed output rather than free text. Takes its model from the Model port. A Messages array on the Message port (e.g. from Chat History) reaches the model whole.
Type in the graph: structured_output_llm
Exec
An error output can be enabled to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working scenario
- Execute + Data
- LLM
Runs as pasted
When to use it
Reach for this node when the model’s answer has to travel on as data rather than as text: splitting an email into fields, classifying a request, pulling out an amount and a date, producing a list of tags. The model must answer with an object matching your JSON Schema, so the next node receives a ready object instead of a string to parse. For free text in a chat use LLM Response; for a model that acts on its own use the AI Agent.
How it works
The schema goes in the “Structured output schema” field. Its fields are available downstream as
{{ nodes.<id>.output.<field> }}, and the whole object travels along the edge. The default
schema has a single string field result, so a freshly dropped node runs immediately; replace it
with your own shape.
The top-level schema must be an object. An array or a scalar is wrapped automatically into an
object with one value field, and the result then has to be read as
{{ nodes.<id>.output.value }}.
Field descriptions are read by the model as instructions. One precise field description often
does more than a paragraph in the system prompt.
The node does not stream: the answer arrives whole, once the model has finished it.
Common mistakes
- The System port is wired but the prompt did not change. “System prompt source” defaults to “Template”, and a connected port is not read in that mode. Switch it to the connected System port, or to Auto.
- Sending the object straight to Exit. The chat then shows JSON. If a
human needs to read it, assemble the text with a Template node — or
add a
textfield to the schema and let Exit show that. - An exotic schema. Not every model accepts
pattern,format,oneOf/anyOf/allOfor deeply nested$ref. If the node fails saying no structured-output method worked, simplify the schema or change the model. - An empty result. The model returned a refusal instead of an object: check that the schema is an object at the top level and that the prompt really asks for those fields.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Modelllm | LLMlink_llm | — | LLM config from llm node (registry or workspace connection) |
Messagemessage | Execute + Dataexecute_data | message | Text, a Message or a Messages array. A Messages array (e.g. from Chat History) reaches the model whole — that is how the conversation history gets in. |
Systemsystem | Datadata | — | System prompt override |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Structured dataoutput | Execute + Dataexecute_data | object |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Message sourcemessage_source | string | auto | auto -- use connected input if available, else template; connected -- always from edge; template -- always from template Options: |
User Message Templateuser_prompt_template | string | "" | Used when source=template or no edge connected. Supports {{inputs.message}}, {{nodes.xxx.output.yyy}} supports templates |
System Prompt Sourcesystem_source | string | template | auto -- use connected system input if available, else template Options: |
System promptsystem_prompt | string | "" | System prompt template supports templates |
Structured Output Schemastructured_output | object | {"type":"object","properties":{"result":{"type":"string","description":"The m… | JSON Schema object the model must answer with; the top-level title is optional (it becomes the API tool name). Defaults to a single string 'result' field so a freshly dropped node runs — replace it with your shape. |
| Advanced | |||
De-identify sensitive datamask_sensitive_data | string | "" | Replace recognised personal data with markers in the text sent to the model, and restore the originals in its answer. Does not cover attachments, knowledge bases, web search or HTTP node calls. Recognition is not guaranteed to be complete. Options: |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.
Ready-made examples using this node
- A customer books an appointment in the conversation
- A reminder an hour before, and exactly one
- A chat message is written into the amoCRM deal
- The bot calls a human when it cannot cope
- What your documents are missing collects itself
- Every conversation lands in a table as a summary
- A request routes itself to the right team
- A request from the inbox becomes a row in a table
- An urgent email reaches Telegram within the minute
- A recording of a stand-up becomes minutes with tasks
- An order that lives in a table between runs
- A photo of a receipt becomes a line of spending
- “Remind me on Friday”, and on Friday it does
- Reviews sorted by tone and topic
- A second brain: throw thoughts in, ask in your words
- A shopping list the bot keeps for you
- Pulling fields out of text
- A form request, parsed and filed