Why 'Loop Over Items (Split in Batches)' is the most underrated node in n8n

— Juliet Edjere

Ever found yourself trying to process a list of items in n8n, only to have a node process the first one? Or maybe you're hitting API rate limits? Or perhaps you're trying to build a pagination system that fetches data page by page until there's nothing left?

If any of that sounds familiar, there's a node in n8n for these exact scenarios: the Loop Over Items node (also referred to as Split in Batches).

It's one of those nodes that, at first glance, might seem redundant. After all, n8n is designed to handle lists of items automatically. And that's why the Loop Over Items node feels underrated – you don't need it most of the time. But when you do need it, it’s a lifesaver.

In this post, we'll dive deep into this node. We'll figure out:

  1. Why you usually don't need it.
  2. The specific, sticky situations where it becomes essential.
  3. How the 'Reset' option works.
  4. Walk through a practical example together.

Ready to unlock some advanced n8n possibilities? Let's go!

Why do I need this node?

This is the fundamental point of confusion for many n8n users, and it's valid. n8n's core design principle is to process data in batches. If you have 10 items coming out of a node, the next node in the workflow will typically receive all 10 items and process them one after another (or sometimes even in parallel, depending on the node and settings).

Think of it like this: you send a list of 10 email addresses to the Email node. The Email node doesn't just see the first address; it sees all 10 and sends 10 separate emails. This is fantastic and covers 90% of use cases.

However, some nodes, due to their nature or how they interact with external services, behave differently. n8n nodes are designed to process a list of input items (with some exceptions...).

The Loop Over Items node exists specifically for those "exceptions." It gives you fine-grained control over how many items are passed at a time to the next node in a loop.

How the Loop Over Items node works

Imagine you have a list of 100 things (API calls to make, emails to send one-by-one via API, articles to process).

The Loop Over Items node takes that entire list of 100 items as its input.

  1. It holds onto the whole list: It remembers all 100 items you gave it.
  2. It sends a small batch out the 'Loop' output: Based on your settings, it might send out just the first 1 item, or 5 items, or 10 items.
  3. Nodes after Loop Over Items process this small batch: The nodes connected to the 'Loop' output only see and process that small chunk of data.
  4. It loops back: When the nodes finish processing that small batch, the Loop Over Items node loops back. It then sends the next small batch of items out of the 'Loop' output.
  5. Repeat: This continues until all the original 100 items have been sent out and processed through the 'Loop' output.
  6. Done! (Output): Once the entire original list has been processed in batches, the Loop Over Items node combines all the results from the individual loop runs and sends them out through its 'Done' output.

This might seem overly complex, but it's the mechanism that lets you handle those specific exceptions gracefully.

Key features

Let's look at the parameters that give this node its power:

Batch Size

This is the most straightforward setting. It simply determines how many items are included in each small batch sent out through the 'Loop' output.

  • Example: If you have 50 items and set Batch Size to 10, the node will loop 5 times, sending 10 items each time. If you set Batch Size to 1, it will loop 50 times, sending 1 item each time.
  • Use case: API Rate Limits - If an API only lets you make 5 requests per second, and you have a list of 100 things you need to request data about, you can use Loop Over Items with a Batch Size of 5 (and perhaps a Wait node after the API call inside the loop) to stay within the limits. You process 5, wait a second, process the next 5, wait a second, and so on. Much better than firing off 100 requests instantly and getting blocked!

Reset

Okay, this is where things can get a little confusing, but it's incredibly powerful for certain scenarios.

Normally, the Loop Over Items node remembers which items from the original input list it still needs to process.

When you turn Reset on, you're telling the Loop Over Items node: "Hey, for this specific iteration of the loop, forget about the original big list for a second. Just treat the current incoming data (whatever came from the node before me in this iteration) as a brand new list of items that need to be processed by this loop run."

Why would you do this? The prime example is dynamic looping like pagination.

  • You start by fetching Page 1 of the data.
  • The Loop Over Items node receives the results from Page 1.
  • With Reset on, the Loop Over Items node processes the items from Page 1 (maybe just one "page" item with metadata, or all the records).
  • Inside the loop, you process the data and, crucially, figure out how to get to the next page (e.g., increment a page number).
  • The workflow flows back to the Loop Over Items node. The new data it receives is the result of your "get next page" logic.
  • Because Reset is on, the Loop Over Items node treats this "next page" data as the input for the new iteration, instead of just looking at the original input list again.
  • This allows you to loop based on the result of the previous loop iteration rather than just iterating over a fixed initial list.

If you use Reset, you must have a valid termination condition within the loop itself. Usually, this involves an IF node connected to the Loop Over Items' 'Loop' output that checks if there are no more pages, or no more items, etc. If your condition is never met, you'll create an infinite loop.

When do you need Loop Over Items - Use cases

Here are the key times this node becomes indispensable:

  1. When a Node strictly processes only the first item: This is a common one. Some older nodes, or nodes designed for very specific integrations, might be built in a way that they only look at the first item they receive, even if the input list has many. Loop Over Items with a Batch Size of 1 forces the node to process one item at a time, effectively looping through the list for you.

  2. To manage API rate limits: As discussed with Batch Size, sending data in chunks is a standard way to handle external service limitations.

  3. For advanced, dynamic looping (like Pagination): The Reset option is key here. When the decision to continue looping depends on the output of the nodes inside the loop (e.g., "Is there a next_page_token in the API response?"), you need Loop Over Items with Reset to make the loop react to the intermediate results. You combine this with an If node and potentially a NoOp node to control the flow back to the Loop Over Items node.

  4. When you need context about the loop progress: The node exposes context variables like {{ $node["Loop Over Items"].context["noItemsLeft"] }} and {{ $node["Loop Over Items"].context["currentRunIndex"] }}.

    • noItemsLeft tells you if there are still items in the original list waiting to be processed. Useful for logging or conditional logic outside a Reset loop.
    • currentRunIndex tells you which iteration you're currently on (starting from 0). Useful for adding sequence numbers, logging progress ("Processing batch 5 of X"), or specific logic on the first/last iteration.

Building the RSS feed

Let's see Loop Over Items with Batch Size: 1 in action. The problem: The RSS Read node only processes the first URL it receives. We want to read two different RSS feeds.

Here’s how to do it in n8n:

  1. Start with a Trigger: Add a Manual Trigger node. This is just to kick off the workflow.

  2. Provide the List of Feeds: Add a Code node connected to the Manual Trigger. We need to give the workflow a list of the RSS feed URLs we want to process.

    • Copy the code into the Code node:

      return [
          {
              json: {
                  url: 'https://medium.com/feed/n8n-io',
              }
          },
          {
              json: {
                  url: 'https://dev.to/feed/n8n',
              }
          }
      ];
      
    • This Code node simply outputs two separate items, each containing a URL property.

  3. Introduce the Loop Over Items node: Add a Loop Over Items node and connect the output of the Code node to its input.

  4. Configure Loop Over Items: This is the crucial step for this problem.

    • In the Loop Over Items node settings, find the Batch Size parameter.
    • Set Batch Size to 1.
    • Why 1? Because the RSS Feed Read node only handles one URL at a time. By setting Batch Size to 1, we are telling the Loop Over Items node: "Send these URLs to the next node one by one."
  5. Add the node that needs looping: Add an RSS Read node and connect the 'Loop' output of the Loop Over Items node to its input.

  6. Configure the RSS Read node: Now, tell the RSS node which URL to read.

    • Select the RSS Feed Read node.
    • In the URL field, you need to tell it to use the URL property coming from the current item in the loop. Since the Loop Over Items node is sending items one by one, each item reaching the RSS node will have the structure { json: { url: '...' } }.
    • Click the variable selector (the little gear or '+') next to the URL field, navigate to Current Node > Input Data > JSON, and select URL. Or, simply type the expression {{ $json.url }} directly into the field.
    • This ensures that on the first loop iteration, the RSS node reads the Medium feed, and on the second iteration, it reads the Dev.to feed.
  7. Test the workflow: Click the "Test Workflow" button (or "Execute Workflow").

    • Watch the nodes light up.
    • You'll see the Code node run, outputting 2 items.
    • The Loop Over Items node will receive these 2 items.
    • Then, you'll see the Loop Over Items node run, sending 1 item to the RSS Feed Read node.
    • The RSS Feed Read node will run for the first URL.
    • The workflow will loop back. The Loop Over Items node will run again, sending the second item.
    • The RSS Feed Read node will run again for the second URL.
    • Finally, the Loop Over Items node's 'Done' output will activate, combining the results from both RSS reads. You can inspect the data from the 'Done' output to see the combined feed items.

Voila! You've successfully used Loop Over Items to force a node that processes one item at a time to handle a list of items.

Summary

The Loop Over Items node, while not needed for every workflow, is a critical tool in your n8n belt. It gives you the control needed to tackle problems like:

  • Working with nodes that have item processing limitations.
  • Respecting API rate limits through controlled batching.
  • Building dynamic loops based on intermediate results (like pagination).

When you encounter one of these tricky scenarios, remember the power of Loop Over Items (Split in Batches). Start with a Batch Size of 1 for nodes that are stubborn, and explore the Reset option when you need truly dynamic looping based on prior steps.

Play around with the node, experiment with the batch size, and try using the context variables in a Set or Code node just to see what they show you.

Happy automating!


ABOUT ME

I'm Juliet Edjere, a no-code professional focused on automation, product development, and building scalable solutions with no coding knowledge.

I document all things MVP validation and how designs, data, and market trends connect.

Click. Build. Launch.

Visit my website → built with Carrd and designed in Figma

Powered By Swish