New-client launch offer: talk to sales about a focused integration pilot using MuleSoft or n8n. See what's included →
Home / Insights / n8n: when to use Loop Over Items
n8n

n8n: when to use Loop Over Items

Learn when automatic item processing is enough and when batching or sequential execution needs a loop.

People arriving from other automation tools add a loop first and think second. In n8n that is usually wasted work, because the item model already loops for you.

The default is already per-item

If a node receives 200 items, it executes 200 times. An HTTP Request node with 200 items in makes 200 calls. A Set node with 200 items in transforms all 200. You do not wrap that in anything.

So before you add Loop Over Items, check whether the node you are looping around already iterates. Most do.

If the only reason for your loop is "there are many items", delete the loop.

The four cases where you do need it

  • Rate limits. The API allows 10 calls a minute and you have 500 items. Batch them and add a Wait node inside the loop.
  • Sequential state. Each call needs a cursor, a token or a running total produced by the previous one.
  • Chunked payloads. The endpoint takes up to 100 records per request and you want 5 calls rather than 500.
  • Memory. Very large datasets where holding every item in flight at once is the problem.

Wiring it, and the trap

Loop Over Items has two outputs. loop carries the current batch into the body; done fires once, after every batch has been through. The last node of the loop body must connect back to the Loop node's input.

// the shape that works
Trigger
  → Loop Over Items  (batch size 10)
      loop → HTTP Request → Wait 6s → back to Loop
      done → Aggregate → Slack

Two things go wrong here more than anything else. Forget the connection back and the loop runs once and stops — the workflow looks successful and has processed ten of your five hundred records. Put the wrong node on done and it fires on every pass instead of once, so you send 50 Slack messages instead of one.

Batch size 1 is not the same as no loop

Setting batch size to 1 forces strictly sequential processing, which is the point when order matters or when the API cannot take concurrency. It is slower by design. Choose it deliberately rather than leaving it at the default and wondering why a 5,000-item run takes an hour.

Reset

The Loop node keeps its position across executions within a run. If you nest loops, or call the same loop from more than one path, you will eventually need the reset option to clear that state. If you find yourself needing it often, the workflow probably wants splitting into a parent and a sub-workflow instead.

Building something where this matters?

Discuss a focused integration pilot covering the agreed workflow, error handling, testing and handover. Talk to our team about available new-client launch benefits.

See the scope

More on this

Let’s Talk

Your request has been accepted

Thank you for contacting BraidArc. We typically respond within one business day.

Reference: