KEEP LEARNING
Build the bigger picture.
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
Tips > Data, APIs & Webhooks
The n8n Aggregate node combines many items into one — use All Item Data to bundle whole items or Individual Fields for a flat list. It is the inverse of Split Out.
In n8n, the Aggregate node combines many separate items into one item — turning a stream of records into a single array you can pass on as one payload. Use All Item Data to bundle whole items together, or Individual Fields to pull one field from every item into a flat list. It is the inverse of the Split Out node.
It collapses multiple incoming items into a single output item. Instead of 15 records flowing downstream separately, the Aggregate node wraps their data into one item — ideal for building a summary, a report, or a single API or email payload.
Add an Aggregate node and choose a mode:
Worked example: a workflow processes 15 order line items individually (for inventory checks), then combines them into one confirmation email.
| Setting | Value |
|---|---|
| Aggregate | Individual Fields |
| Input Field | product_name → Output: products |
| Input Field | line_total → Output: amounts |
// Input — 3 items:
{ "product_name": "Widget A", "line_total": 29.99, "qty": 2 }
{ "product_name": "Widget B", "line_total": 49.99, "qty": 1 }
{ "product_name": "Widget C", "line_total": 15.00, "qty": 5 }
// Aggregated output — 1 item:
{
"products": ["Widget A", "Widget B", "Widget C"],
"amounts": [29.99, 49.99, 15.00]
}
Follow up with a Code node to build the email body:
const products = $json.products;
const amounts = $json.amounts;
const total = amounts.reduce((sum, val) => sum + val, 0);
let body = "Order Summary:\n\n";
for (let i = 0; i < products.length; i++) {
body += `- ${products[i]}: $${amounts[i].toFixed(2)}\n`;
}
body += `\nTotal: $${total.toFixed(2)}`;
return [{ json: { emailBody: body, orderTotal: total } }];
| Node | What it does | Items in → out |
|---|---|---|
| Aggregate | Combines many items into one | Many → 1 |
| Split Out | Splits one item's list into many items | 1 → many |
They are opposites: use Split Out to fan a list into separate items, and Aggregate to gather them back together.
Related: Split one item into many (Split Out) · Process large datasets in batches (Split in Batches) · Enrich records with the Merge node
KEEP LEARNING
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
APPLY IT TO YOUR SYSTEM
Bring the process, the tools involved and an example of where the current workflow gets stuck.