Sparround

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.

NodeWhat it doesEffect on item count
Edit Fields (Set)Adds fields, renames them, drops the ones you do not needUnchanged
Split OutTurns a list inside an item into separate itemsIncreases
AggregateCollects separate items into a list inside one itemDecreases (usually to 1)
SummarizeGroups and aggregates like an Excel pivot table (sum, count, avg)Becomes the number of groups
SortOrders items, or randomises themUnchanged
LimitCaps the number of itemsDecreases
Remove DuplicatesEliminates identical itemsDecreases
MergeCombines two streams: appending, or joining on a keyDepends on the mode
Compare DatasetsCompares two streams and produces up to four outputsSplits

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