When building automations in n8n, handling data flow between nodes is one of the most important skills. Three commonly used nodes
Aggregate
Merge
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
When you want to combine multiple rows into a single record.
When an API expects an array of objects in one request.
When you need to summarize or report data.
How to use
Connect the node after a source that returns multiple items (e.g., Google Sheets).
Choose the mode: Keep All Items, Aggregate Fields, or Count.
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
Build two branches of data.
Connect them to Input 1 and Input 2 of the Merge node.
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
Connect the node after a data source that returns multiple items.
Set the batch size (e.g., 10).
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
Node | What it Does | When to Use | Example |
---|
Aggregate | Combines many items β 1 item | Grouping, reporting, and API payload building | One JSON array of all contacts |
Merge | Joins two branches | Data enrichment, combining sources | Merge Sheet + API results |
Split in Batches | Breaks items into chunks | Loops, rate limits, sequential processing | Process 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.