Tips > Data, APIs & Webhooks

Aggregate Multiple Items into a Single Summary Using the Aggregate Node

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.

What does the n8n Aggregate node do?

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.

How do you combine multiple items into one in n8n?

Add an Aggregate node and choose a mode:

  • All Item Data — keep whole items together as an array of objects.
  • Individual Fields — extract one named field from every item into a flat list. Turn on Merge Lists to output a single flat list instead of a list of lists.

Worked example: a workflow processes 15 order line items individually (for inventory checks), then combines them into one confirmation email.

SettingValue
AggregateIndividual Fields
Input Fieldproduct_name → Output: products
Input Fieldline_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 } }];

Aggregate vs Split Out: what is the difference?

NodeWhat it doesItems in → out
AggregateCombines many items into oneMany → 1
Split OutSplits one item's list into many items1 → many

They are opposites: use Split Out to fan a list into separate items, and Aggregate to gather them back together.

When should you aggregate items into a batch?

  • Building one API request (a batch payload) from many records.
  • Composing a single email or report from loop results.
  • Producing a summary object after a Split in Batches loop.
  • Reducing many items to one before a final write or notification.

Related: Split one item into many (Split Out) · Process large datasets in batches (Split in Batches) · Enrich records with the Merge node

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

190 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book an introductory call