n8n  

Aggregate vs Merge vs Split in n8n - A Complete Guide with Examples

When building automations in n8n, handling data flow between nodes is one of the most important skills. Three commonly used nodes

  1. Aggregate

  2. Merge

  3. Split

often confused because they all deal with how data is structured and passed along in workflows.

In this article, we’ll break down each one in detail with what, when, why, and how to use them, along with real-world examples.

n8n

Aggregate Node

What it does

The Aggregate node combines multiple items into one single item. Instead of processing each row separately, you can group them together into one array or object.

When to use

  1. When you want to combine multiple rows into a single record.

  2. When an API expects an array of objects in one request.

  3. When you need to summarize or report data.

How to use

  1. Connect the node after a source that returns multiple items (e.g., Google Sheets).

  2. Choose the mode: Keep All Items, Aggregate Fields, or Count.

  3. Map the fields you want to aggregate.

Example

Google Sheet returns 3 contacts:

[
 { "Name": "A", "Email": "[email protected]" },
 { "Name": "B", "Email": "[email protected]" },
 { "Name": "C", "Email": "[email protected]" }
]

Aggregate β†’ Keep All Items:

{
 "allContacts": [
   { "Name": "A", "Email": "[email protected]" },
   { "Name": "B", "Email": "[email protected]" },
   { "Name": "C", "Email": "[email protected]" }
 ]
}

Use case: Send one email with all contacts listed inside instead of sending multiple emails.

Merge Node

What it does

The Merge node takes two input branches and combines them into one output. You can merge by:

  • Key (field match) β†’ Join records based on a field (like SQL JOIN).

  • Index β†’ Match items by order.

  • Append β†’ Just combine items from both inputs.

When to use

  • When you have two data sources that need to be combined.

  • When running parallel branches, you want to bring them back together.

  • When enriching data (e.g., combining Google Sheet data with API data).

How to use

  1. Build two branches of data.

  2. Connect them to Input 1 and Input 2 of the Merge node.

  3. Select the merge mode (Append, Merge by Key, or Merge by Index).

Example

Branch 1 (Google Sheet):

[
 { "ID": 1, "Name": "A" },
 { "ID": 2, "Name": "B" }
]

Branch 2 (API):

[
 { "ID": 1, "Email": "[email protected]" },
 { "ID": 2, "Email": "[email protected]" }
]

Merge by Key (ID):

[
 { "ID": 1, "Name": "A", "Email": "[email protected]" },
 { "ID": 2, "Name": "B", "Email": "[email protected]" }
]

Use case: Enrich Google Sheet data with email details from an external API.

Split in Batches Node

What it does

The Split in Batches node breaks an array of items into smaller groups (batches) and processes them step by step. It’s often used to simulate loops in n8n.

When to use

  • When an API has rate limits (e.g., max 100 records per request).

  • When you want to process each item one by one.

  • When handling large datasets that need to be chunked.

How to use

  1. Connect the node after a data source that returns multiple items.

  2. Set the batch size (e.g., 10).

  3. Use the loop output to process each batch until all items are done.

Example

Google Sheet returns 100 contacts.
Your Email API allows only 10 at a time.

Split in Batches (10):

  • Batch 1: 10 contacts

  • Batch 2: 10 contacts

  • …

  • Batch 10: 10 contacts

Use case: Send bulk emails in smaller groups to avoid hitting API limits.

Quick Comparison

NodeWhat it DoesWhen to UseExample
AggregateCombines many items β†’ 1 itemGrouping, reporting, and API payload buildingOne JSON array of all contacts
MergeJoins two branchesData enrichment, combining sourcesMerge Sheet + API results
Split in BatchesBreaks items into chunksLoops, rate limits, sequential processingProcess 100 contacts in 10 batches
N8N Aggregate VS Merge VS Split

Conclusion

  • Use Aggregate when you want one combined output.

  • Use Merge when you want to join data from two streams.

  • Use Split in Batches when you want to loop or chunk data for processing.

Mastering these three nodes helps you design workflows that are scalable, efficient, and API-friendly in n8n.