Return items pattern in n8n
- Feb 13
- 1 min read
What this means (non-technical)
In Code nodes, returning items improperly can cause unexpected behavior. Code nodes must return data in the structure expected by downstream nodes.
If the return format is inconsistent, downstream nodes may break.
What usually goes wrong
Incorrect return patterns can:
Drop data silently.
Return empty results.
Break item structure.
Cause confusing downstream errors.
The workflow may appear to run, but outputs do not match expectations.
These issues are often subtle and hard to trace.
When this becomes urgent
This becomes urgent when:
Code nodes transform multiple items.
Data suddenly disappears.
Downstream nodes fail without clear cause.
You change existing code.
The more complex the data structure, the more sensitive return formatting becomes.
Detect issues in your n8n workflows
|
Definitions
Return items: The data structure a Code node outputs to the next node.
Item: A single unit of data passed between nodes.
Disclaimer
This article highlights common patterns and risks seen in real-world n8n workflows. It’s meant to help you build more confidently and avoid surprises as your automation grows. Behavior can vary depending on your setup, version, and configuration.