Transformation nodes: reshaping data without code
n8n gives you three routes for transforming data, and the order of preference is:
1. Expressions — when you need to compute one or two fields 2. Dedicated transformation nodes — when the structure must change (grouping, splitting, sorting) 3. The Code node — only when the first two are not enough
Following that order keeps a workflow in a state someone else can read. Seeing a Sort node on the canvas is far easier than reading 15 lines of JavaScript.
| Node | What it does | Effect on item count |
|---|---|---|
| Edit Fields (Set) | Adds fields, renames them, drops the ones you do not need | Unchanged |
| Split Out | Turns a list inside an item into separate items | Increases |
| Aggregate | Collects separate items into a list inside one item | Decreases (usually to 1) |
| Summarize | Groups and aggregates like an Excel pivot table (sum, count, avg) | Becomes the number of groups |
| Sort | Orders items, or randomises them | Unchanged |
| Limit | Caps the number of items | Decreases |
| Remove Duplicates | Eliminates identical items | Decreases |
| Merge | Combines two streams: appending, or joining on a key | Depends on the mode |
| Compare Datasets | Compares two streams and produces up to four outputs | Splits |
Put Edit Fields in early. The API returns 40 fields and you need 4 — carrying the other 36 to the end of the flow is pointless. Trimming early reduces memory and keeps downstream nodes' INPUT panels readable. It is the small habit with the biggest effect on a workflow's readability.
Split Out and Aggregate are inverses and are often used as a pair:
- Split Out opens a list into items
- You act on each item (filter, API call, AI)
- Aggregate collects the results back into one item
Choosing the mode in Merge matters. Simply stacking two streams (append) and joining them on a shared key (say, email) produce completely different results. The wrong mode causes silent data loss — rows that fail to join just do not appear in the output.
📚 Sources and documentation
- Approaches for transforming dataofficialdocs.n8n.io
The official comparison between expressions, transformation nodes and the Code node.
- Aggregate nodeofficialdocs.n8n.io
- Summarize nodeofficialdocs.n8n.io
- Merge nodeofficialdocs.n8n.io