October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk13 min

How to Loop Over Items in n8n (and When You Don’t Need a Loop)

Most n8n nodes process incoming items automatically. This guide shows when to use Loop Over Items, how to wire batch processing, where to place Wait and If nodes, and how to troubleshoot stalled or repeating loops.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Most n8n nodes already process every incoming item automatically, so the first step is usually to remove the loop you were about to add. Use n8n’s Loop Over Items node (also called Split in Batches in some documentation and versions) when you must control how many items are handled at once—for example, to respect an API limit, insert a delay between requests, or process a paginated sequence. Send the loop output through your action nodes, connect that chain back to the loop, and use the node’s done output for work that should run only after all batches finish.

What “looping” means in n8n

An n8n execution carries data as a list of items. A node that receives several items normally runs its operation for each item and passes the resulting list onward. This item-oriented behavior is why many workflows do not need an explicit loop at all. If your objective is simply “run this transformation or request for every incoming item,” connect the nodes directly and let the receiving node process the list.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An explicit loop changes the flow of that list. Loop Over Items retains the incoming items, releases a configured number of them through its loop output, waits for the downstream branch to return, and then releases the next group. When the node has completed the input, its done output provides the combined processed data for steps that belong after the complete run. The node therefore controls when items move and how many move per pass; it is not a requirement for ordinary per-item processing.

Decide whether you need a loop

Requirement Recommended design Reason
Apply a normal n8n operation to every incoming item Connect the nodes directly Most nodes already iterate over their input list.
Send a controlled number of items at a time Loop Over Items with a batch size The loop output releases only the configured number per pass.
Pause between groups of requests Loop Over Items plus Wait The delay is placed in the returning branch so the next batch starts later.
Keep requesting pages until no page remains Loop Over Items plus conditional logic, such as If A loop controls batches, but a condition determines whether another page exists.
Run a final step once after everything is processed Connect that step to the done output The done branch is emitted after loop processing completes.
Run a step for each individual batch Connect it to the loop output branch That branch executes during each pass rather than only at completion.

A useful test is to inspect the input count at the node where you want to add a loop. If the node already accepts a list and performs the same operation for each item, adding Loop Over Items can make the workflow harder to understand without solving a problem. Add it when you have a concrete boundary—an API quota, a service that cannot accept the full list, a required delay, or a multi-page retrieval process.

How Loop Over Items works

Input is preserved

The node receives the complete incoming item list. It does not ask you to create a separate loop variable or manually increment an index for ordinary batching. Its purpose is to divide that existing list into passes while keeping the item data available to downstream nodes.

Batch size controls each pass

The batch-size setting is the number of items released through the loop output in one pass. A batch size of one gives you one-item-at-a-time behavior. A larger value lets an action node work on a group while still preventing the entire input from being sent at once. The final pass may contain fewer items when the total input is not evenly divisible by the selected size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The loop and done outputs have different jobs

The loop output is the working branch. Connect the actions that must run for each pass there. The done output is the completion branch. Connect reporting, a final database write, a notification, or another downstream stage there when it must wait for all batches to finish. Sending a final step from the loop output instead causes that step to run repeatedly—once per pass.

Returning to the loop advances processing

After the action branch has finished, connect its final node back to the Loop Over Items node as shown in the n8n documentation and tutorials. That return connection tells the loop that the current pass is complete and allows it to release the next pass. Without the return path, the workflow cannot progress through the remaining batches in the intended way.

Basic batch workflow: step by step

  1. Prepare a source. Use a trigger or source node that produces multiple items, such as rows, records, or objects. Verify the execution data so you know how many items are entering the flow.
  2. Add Loop Over Items. Place it immediately after the source or after any filtering and shaping that should happen before batching. In some n8n versions the node is shown as “Loop Over Items (Split in Batches).”
  3. Set the batch size. Choose how many items should be released per pass. Start with a conservative value while testing, then increase it only when the receiving service and your workflow can handle the larger group.
  4. Build the loop branch. Connect the loop output to the action that should process each batch—for example, an HTTP Request node, an Edit Fields (Set) node, or a Google Sheets operation.
  5. Return the branch. Connect the last node in that action chain back to Loop Over Items. If you have several actions, the return connection comes from the last action, not from an earlier intermediate node.
  6. Build the completion branch. Connect the done output to steps that should run once after every batch has been processed.
  7. Run a small test. Use a source with only a few items and a batch size that produces more than one pass. Inspect each execution so you can see the first pass, the return to the loop, the later pass, and the final done branch.
  8. Increase the data gradually. Once the wiring is correct, test a larger input and observe execution time, API responses, and the shape of the data arriving at the done output.

Exact field names and visual labels can change between n8n releases. If your editor uses slightly different names, look for the node’s loop/work output, completion/done output, and batch-size control rather than relying on a screenshot from an older version.

Rate-limit pattern: batch, act, wait, repeat

Batching limits how many items are sent together; it does not by itself create a time delay. When an API or other service requires a pause between requests, put a Wait node in the branch that returns to the loop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Connect your source to Loop Over Items.
  2. Connect the loop output to HTTP Request (or the service-specific action).
  3. Connect the request node to Wait.
  4. Configure Wait for the interval required by the service’s documented limit.
  5. Connect Wait back to Loop Over Items.
  6. Connect the done output to the next stage that should run after the final batch.

This arrangement makes the sequence explicit: release a batch, perform the action, pause, then ask the loop for the next batch. A tutorial example sometimes uses “10 requests every 10 seconds” to illustrate this design; that is an example scenario, not a universal n8n limit. Use the quota published by the API you are calling, including any rules about requests per account, endpoint, minute, or concurrent connection.

Do not place the Wait node on the done branch when the intention is to slow every pass. The done branch runs after completion, so a delay there affects only the post-processing stage. Likewise, a delay before Loop Over Items slows the workflow before batching but does not create a pause between individual passes.

Pagination pattern: looping until another page is unavailable

Pagination is different from sending a fixed list in batches. A paginated API may return a token, cursor, page number, or “has more” indication that tells you whether to request another page. Loop Over Items alone cannot infer that condition. Add explicit conditional logic, commonly an If node, to decide whether the workflow should request another page.

Conceptual flow

  1. Start with the first-page request or the initial page parameters.
  2. Pass the returned records through the processing branch.
  3. Inspect the response metadata for the service’s indication that another page exists.
  4. Use an If node to split the flow. The true branch prepares the next cursor or page value and returns to the request/loop path; the false branch proceeds to completion.
  5. Send the accumulated or final data to the done branch and then to downstream steps.

The exact cursor field and comparison depend on the API. Keep the condition tied to the service’s documented response rather than assuming that an empty array, a particular status code, or a fixed page count always means the same thing. A fixed batch loop is appropriate when all items are already known; a conditional pagination loop is required when new items are discovered page by page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choosing a batch size

There is no single correct batch size. Choose it from the limits of the action in your branch and the amount of work each item requires.

  • Use one item per pass when the endpoint permits only one record per request, each item is expensive, or you need the clearest failure isolation.
  • Use a small group when the API accepts a limited number of records and you want fewer requests without sending a large payload.
  • Use a larger group when the downstream node is designed for list input and the service accepts the resulting payload comfortably.
  • Reduce the size when you see payload-size errors, timeouts, throttling, or failures that become difficult to identify inside a large batch.
  • Increase it cautiously only after a test confirms that the receiving service, n8n execution, and any intermediate transformations remain reliable.

The batch size is a scheduling control, not a guarantee that an external service will accept the same number of records. The action node may impose its own request-size, field-count, or concurrency limits, so treat those limits as a separate constraint.

Where to put transformations and filters

Before the loop

Place filtering, deduplication, or field selection before Loop Over Items when those operations should apply to the entire source list before it is divided. This can reduce the number of items entering the loop and avoids spending a batch pass on records you already know you will discard.

Inside the loop

Place per-item or per-batch preparation on the loop branch when it must happen immediately before the action. For example, an Edit Fields (Set) node can shape the current pass into the fields expected by an HTTP Request node. Because the branch returns to the loop, that preparation occurs for each pass.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After the done output

Place a final report, notification, or downstream aggregation after done when it must see the completed result rather than an intermediate pass. This is also the appropriate location for a step that should run once, not once per batch.

Understanding data at the loop and done branches

The loop branch is for work in progress. It receives the current batch, so a node there should be designed to act on that subset. The done branch represents the node’s completed execution and returns the combined processed data from the loop. Use the execution view to verify what your particular node version exposes at each output, especially when an action creates new fields, removes fields, or returns a response object instead of the original item.

If the action node replaces the input with an API response, decide where the original identifier must be preserved before the request. An identifier or correlation field can make it easier to match responses to source records during troubleshooting. The right field name depends on your data; do not assume that a service’s response automatically carries every source field forward.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common wiring mistakes and fixes

The loop runs once and stops

Check that the final node in the working branch is connected back to Loop Over Items. A branch that ends at the action node has no return path to request another batch. Also confirm that the action actually completes; a waiting or failed node cannot signal the next pass.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The final step runs repeatedly

The step is probably connected to the loop output. Move it to the done output when it should run once after all batches. Keep genuinely per-batch actions on the loop branch.

Only one item is processed

Inspect the source execution and the batch-size setting. The source may be producing one item, an earlier filter may have removed the rest, or the chosen branch may not be returning to the loop. Test with a known multi-item input so you can distinguish a data issue from a wiring issue.

The service responds with throttling or payload errors

Lower the batch size, add a Wait node between passes, and compare the request shape with the service’s limits. A loop does not override an external quota. If the service requires a delay, the Wait node must be in the returning branch so it occurs between batches.

Rank #4
Sale
PowerShell for Sysadmins: Workflow Automation Made Easy
  • Book - powershell for sysadmins: workflow automation made easy
  • Language: english
  • Binding: paperback

A pagination workflow never ends

Inspect the If condition and the value used to determine whether another page exists. Make sure the next-page branch changes the cursor or page parameter before returning to the request path. Add a safety condition appropriate to the API, such as stopping when its continuation value is absent, rather than relying on the loop node to detect pagination automatically.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The done branch contains unexpected data

Open the execution data for the action inside the loop and compare it with the done output. The action may be returning only its response, while you expected the original item plus response fields. Adjust the data-shaping step inside the branch so the fields needed after completion are retained.

Testing and operating a loop safely

  1. Start with a controlled input. Use a small, representative set that includes at least enough items to create two passes.
  2. Confirm pass boundaries. Check that the first loop execution contains the expected number of items and that the next pass contains the remainder.
  3. Check the return path. Verify that the action completes before the next batch starts, especially when a Wait node or a slow HTTP Request is involved.
  4. Validate completion behavior. Confirm that the done branch fires only after the last pass and that it receives the fields required by your final step.
  5. Test failures deliberately. Use a safe endpoint or test data to observe what happens when one action fails. Identify the item or batch involved before increasing the batch size.
  6. Scale in stages. Move from a few items to a realistic load while watching service responses, execution duration, and the resulting data shape.

One third-party tutorial claims that processed results may remain in memory until a loop finishes. That behavior is not established by the official documentation cited for this topic, so do not treat it as a universal rule. Nevertheless, large batches and large response bodies can make any workflow heavier. Keep payloads focused, avoid carrying unnecessary fields through every node, and test with the data volume you actually expect.

Loop output versus done output: a practical decision guide

Where to connect a node Use it when Typical examples
Loop output The node must run for every pass HTTP Request, field mapping, per-batch validation, Wait
Return path to Loop Over Items The current pass is finished and the next pass may begin The final action in a request-and-delay chain
Done output The node must run after all passes Final notification, complete-run report, downstream workflow stage

When drawing a workflow, label the branch purpose in a note or node name. “Per batch” and “after all batches” are different scheduling requirements, and making that distinction visible prevents many accidental duplicate notifications and premature reports.

Version and label differences

n8n’s node name and editor labels can change. Current documentation identifies the feature as Loop Over Items and also references the former or alternate name Split in Batches. Option names, defaults, output labels, and reset behavior should be checked in the documentation for the n8n version you are running before you copy a configuration exactly. The stable design principles are the input list, configured batch release, a returning action branch, and a completion output; the visual wording may differ.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A compact design checklist

  • Have you confirmed that the target node does not already process every input item?
  • What concrete constraint requires batching: a quota, payload limit, delay, or pagination condition?
  • Is the batch size appropriate for the action’s request and response limits?
  • Does every per-pass action sit on the loop output branch?
  • Does the final action return to Loop Over Items?
  • Are once-only steps connected to done rather than loop?
  • If a delay is required, is Wait between the action and the return connection?
  • If pages are involved, does an If condition determine whether another page is requested?
  • Have you tested with more than one pass and inspected both outputs?
  • Are the fields needed after completion preserved through the action branch?

Bottom line

Use direct node-to-node connections for ordinary per-item processing. Add Loop Over Items only when you need controlled batching. Set its batch size, send the loop output through the work you want repeated, insert Wait there when a rate limit requires a pause, return the branch to the loop, and reserve the done output for work that belongs after every batch. For pagination, pair the loop with an If condition that explicitly decides whether another page exists.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.