Back to Blog
n8nguideautomationworkflowdata processing

n8n Split in Batches: A Complete Guide for 2026

n8nautomation TeamApril 18, 2026
TL;DR: The n8n Split in Batches node is essential for processing multiple items from a single execution. It allows you to loop through data one-by-one (or in small groups), handle API rate limits effectively, and prevent memory overload by breaking large datasets into manageable chunks.

Handling large volumes of data is a core challenge in automation. If your workflow fetches 100 new eCommerce orders, how do you process each one individually to update inventory or add them to a spreadsheet? The n8n Split in Batches node is the fundamental building block for solving this exact problem. It provides the power to loop, process, and manage data sequentially, turning complex, multi-item tasks into simple, reliable automations.

What is the n8n Split in Batches Node?

At its core, the Split in Batches node is a looping mechanism. It takes an incoming array of data (like a list of contacts, orders, or files) and breaks it into smaller, separate "batches". The workflow then executes the nodes that follow it once for each batch.

When a batch is finished processing, the node automatically loops back and passes the next batch to the following nodes. This continues until all batches have been processed. This looping behavior is the key to handling items one-by-one or in small groups rather than all at once.

For example, if a previous node returns an array of 50 items and you set the "Batch Size" to 1, the subsequent nodes will run 50 separate times, once for each item.

Why You Need to Use Split in Batches

This node isn't just a "nice to have"; it's critical for building robust and scalable workflows. Here are the most common reasons to use it:

  • Processing Items Individually: This is the most frequent use case. You have a list of items and you need to perform actions on each one separately. For example: sending a personalized email to each new subscriber or creating a separate Trello card for each task in a list.
  • Respecting API Rate Limits: Many services limit how many requests you can make in a given time period (e.g., 100 requests per minute). If you try to update 500 contacts at once, the API will reject most of your requests. Split in Batches allows you to process them in chunks (e.g., 50 at a time) and add a pause between batches to stay within the limits.
  • Managing Memory and Performance: Loading thousands of items into memory at once can cause performance issues or even crash your workflow. Running complex loops can be particularly memory-intensive, which is why a stable, managed solution from n8nautomation.cloud is so effective—it handles the server resources so you can focus on building. Splitting the data ensures your instance only has to deal with a manageable number of items at any given moment.
  • Error Handling: If one item in a large batch fails, the entire batch might fail. By processing items one-by-one, you can isolate failures. A single failed order won't prevent the other 99 from being processed correctly.

How to Configure the Split in Batches Node

The node itself is straightforward, but its settings are powerful. Let's break down the main parameters in the "Parameters" tab.

  1. Field to Split: This tells the node which incoming data to split. By default, it takes all incoming items, which is usually what you want. You can specify a field if your data is nested (e.g., {{ $json.orders }}).
  2. Batch Size: This is the most important setting. It defines the maximum number of items in each outgoing batch.
    • Set this to 1 to process items one by one.
    • If an API allows 50 items per request, set this to 50.

Under the Options section, you have more granular control:

  • No Batching: This option essentially disables the node, passing all incoming items through as a single batch. It's useful for toggling looping on and off during development.
  • Keep Batch Number: Adds a batchIndex property to your items, which can be useful for logging or debugging.
  • Reset: When enabled, this option ensures that the node outputs nothing after the final batch has completed. This is crucial for preventing the workflow from continuing with the data from the last batch, which can cause duplicate actions. In most cases, you should leave this enabled.

Practical Workflow: Syncing Orders to Google Sheets

Let's build a common workflow: fetching new eCommerce orders and adding each one as a new row in a Google Sheet.

  1. Trigger Node (e.g., Cron): Start with a Cron node set to run every 15 minutes to check for new orders.
  2. HTTP Request Node (or eCommerce Node): Add a node to fetch orders from your store's API (like Shopify, WooCommerce, or BigCommerce). Configure it to get orders with a "new" status. This node will output an array of order objects.
    Example output: `[ { "id": 101, "total": 29.99 }, { "id": 102, "total": 45.50 } ]`
  3. Split in Batches Node: This is where the magic happens.
    • Connect it after your eCommerce node.
    • Set the Batch Size to 1. This ensures each order is processed individually.
    • Leave the default options, including Reset, enabled.
  4. Set Node: The data from your store might not be in the perfect format for Google Sheets. Use a Set node to map the fields.
    • Set Keep Only Set to `true`.
    • Create properties like `order_id`, `customer_name`, and `total_price`, and use expressions to pull the data from the incoming item (e.g., `{{ $json.id }}`).
  5. Google Sheets Node:
    • Set the operation to Append or Update.
    • Select your Spreadsheet and Sheet Name.
    • The columns will populate automatically based on the output of your Set node.

When you execute this workflow, the Split in Batches node will receive the list of orders, send the first order to the Set and Google Sheets nodes, then loop back to send the second order, and so on, until every order has its own row in the sheet.

Tip: Use the NoOp node (short for No Operation) right before your Split in Batches node to act as a stable data source. This is invaluable when you need to access data from a node that ran before the loop started. You can easily reference its data inside the loop using an expression like {{ $('NoOp').json.my_data }}.

Common Problem: Losing Data from Previous Nodes

A frequent point of confusion is accessing data from earlier in the workflow once you're inside a Split in Batches loop. By default, nodes in the loop only "see" the data from the current batch. Any metadata or results from nodes before the split are gone.

The Scenario: Imagine you fetch a User ID from one node, then fetch all of that user's 20 projects in a second node. The third node is Split in Batches to process each project one by one. Inside the loop, you need the User ID to update a database, but it's no longer available—only the project data is.

The Solution: Use Expressions to Look Outside the Loop

You can pull data from any previous node in your workflow using expressions. This is the correct way to solve this problem:

  1. Give the node that contains the data you need a unique name (e.g., `FetchUserInfo`). You can do this by clicking the node's name in the top-left of its parameter window.
  2. In a node inside the loop (like a Set or HTTP Request node), use an expression to reference the data from that specifically named node.
  3. The expression format is: {{ $('NodeName').json.path.to.data }}.
  4. In our example, to get the User ID, the expression would be: {{ $('FetchUserInfo').json.userId }}.

This expression tells n8n: "Ignore the current input and go find the node named 'FetchUserInfo', then give me the `userId` from its JSON output." This is a fundamental skill for building advanced n8n workflows.

Advanced Use Case: API Rate Limiting

Let's say you need to update 1,000 contacts in your CRM, but the API only allows 100 updates per minute. A simple loop would fail after the 100th request. Here’s how to build a rate-limited workflow:

  1. Fetch Contacts Node: Gets all 1,000 contacts.
  2. Split in Batches Node:
    • Set Batch Size to 100. This will create 10 batches.
  3. HTTP Request Node (or CRM Node): This node performs the update. Because the batch size is 100, this node will receive 100 items at once and should be configured to handle a bulk update if the API supports it. If not, you would need a nested loop (a loop within a loop), which is a more advanced pattern.
  4. Wait Node: This is the key to rate limiting.
    • Place it after your HTTP Request node.
    • Set Wait Time to 60 seconds.

This workflow processes the first batch of 100 contacts, then pauses for 60 seconds. The Split in Batches node then sends the next batch of 100, which are processed, followed by another 60-second pause. This cycle repeats until all 1,000 contacts are updated, all while respecting the API's rate limit.

When NOT to Use Split in Batches

While powerful, the Split in Batches node isn't always the right tool. You should not use it if your goal is to aggregate data into a single output.

For instance, if you fetch 20 orders and want to send a single Slack message summarizing the total sales, you do not need to loop. Looping would result in 20 separate Slack messages. Instead, you would use a node like the Code Node or other data transformation nodes to add up the totals from all items at once and then pass that single, aggregated result to the Slack node.

Understanding when to loop versus when to aggregate is key to mastering n8n. Use Split in Batches for sequential, item-by-item actions, not for summary reports.

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.