Automation Blog

How to Do Sequential Looping and Iterations in Zapier Steps

How to process a list of items one at a time inside a Zapier workflow — covering Looping by Zapier, sub-Zap patterns, and Code step approaches for sequential iteration when each item needs to be handled in order.

ZapierLoopingAdvanced Zapier

By Troy Tessalone · · 6 minutes

Automation Guide

A practical field guide from Automation Ace.

How to Do Sequential Looping and Iterations in Zapier Steps

Zapier Zaps are designed to process one record at a time — a trigger fires for a single event, and the subsequent action steps execute once for that event. When you need to process a list of items within a single Zap run — send an email for each item in an order, update each row in a spreadsheet result set, or call an API for each record in a search result — you need a looping pattern. Zapier provides native tooling for this with Looping by Zapier, and there are additional patterns using sub-Zaps and Code steps for cases where the native tool's constraints are limiting. This guide covers each approach and when to use it.

Understanding Why Loops Are Non-Trivial in Zapier

Zapier's execution model is linear: steps run in sequence, once per Zap run. There is no native for loop construct in the visual editor. When a trigger returns multiple items (for example, a Search step that returns 10 rows from a Google Sheet), Zapier does not automatically run subsequent steps for each row — it uses only the first result, or it requires explicit handling to process each item. Looping is the mechanism for processing each item in a list.

It is also important to distinguish between two kinds of iteration in Zapier:

  • Parallel processing: Each item in a list triggers an independent Zap run simultaneously — fast, but with no guaranteed order and no ability for items to depend on the result of the previous item.
  • Sequential processing: Each item is processed one at a time, in order, with each iteration completing before the next begins. This is what is needed when order matters, when there are API rate limits to respect, or when each iteration's output feeds the next.

Looping by Zapier is primarily a parallel tool. True sequential iteration — where item 2 waits for item 1 to complete — requires a different approach.

Looping by Zapier: The Native Option

Looping by Zapier is a Zapier-native app available on Professional plans and above. It takes a list of values and runs the subsequent Zap steps once for each item in the list. The items are processed as a batch within the same Zap run.

To use Looping by Zapier:

  1. Add a Looping by Zapier action step after the step that produces your list.
  2. Map the list values into the Loop's input fields — each item becomes a separate iteration.
  3. Add the action steps that should run for each item after the Loop step. These steps have access to the current iteration's values.
  4. Looping by Zapier processes each iteration and then ends the loop, continuing to any steps after the loop block.

Looping by Zapier is effective when:

  • The list is small (Zapier has limits on loop iterations per Zap run — typically up to 500 items, but check current Zapier documentation for the specific limit)
  • The order of processing does not strictly matter
  • Each iteration is independent — no item needs the result of a previous item

Looping by Zapier is available as part of Zapier's built-in native tools. The iteration count within a single Zap run affects task consumption — each iteration of each action step counts as a task.

When You Need True Sequential Iteration

Looping by Zapier does not guarantee strict sequential execution in the sense that item N+1 waits for item N to complete before starting. For truly sequential processing — where each step's output or side effect must complete before the next item begins — the options are:

Option 1: Sub-Zap chaining (Trigger + Delay pattern)

Process items sequentially by having each Zap step trigger the next run with a small delay between items:

  1. The first Zap processes item 1 from the list and sends the remaining list (items 2 through N) as a webhook payload to a second Zap, along with a Delay by Zapier step to introduce pacing.
  2. The second Zap processes item 2 from the received list, then triggers itself again with the remaining items.
  3. This continues until the list is empty.

This recursive pattern is powerful but complex to build and debug. It works well for small lists and situations where API rate limiting requires guaranteed spacing between calls. The Delay by Zapier step (available in the built-in tools) can enforce a minimum interval between iterations.

Option 2: Code step with sequential API calls

When the list is known at the time of the Zap run and the sequential operations are API calls, a single JavaScript Code step or Python Code step can handle the entire iteration with true sequential execution:

// JavaScript Code step example
const items = inputData.items.split(','); // list passed as comma-separated string
const results = [];

for (const item of items) {
  const response = await fetch('https://api.example.com/process', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer ' + inputData.apiKey, 'Content-Type': 'application/json' },
    body: JSON.stringify({ id: item.trim() })
  });
  const data = await response.json();
  results.push(data.result);
  // Each iteration awaits the previous — truly sequential
}

output = { results: results.join(','), count: results.length };

This approach gives you complete control over execution order, error handling, and pacing (you can add delays between iterations using await new Promise(r => setTimeout(r, 1000))). The trade-off is that the Code step has a maximum execution time — Zapier Code steps time out after a set period, so very large lists may not complete within the limit.

Option 3: External processing service

For very large lists, complex sequential logic, or operations that exceed Zapier Code step time limits, route the list to an external service for processing. The Zap sends the full list to an AWS Lambda function, a Cloudflare Worker, or a Make scenario via a webhook, and that service handles the sequential iteration. The result is returned to Zapier (or written directly to the target system) when processing completes. See how to use APIs in Zapier steps for how to make outbound webhook calls from a Zap.

Choosing the Right Pattern

ScenarioRecommended Approach
Small list, order doesn't matter, each item independentLooping by Zapier
Small list, sequential order required, API calls per itemCode step with async loop
Medium list with rate limiting between itemsSub-Zap chaining with Delay
Large list or complex sequential logicExternal service via webhook
True sequential looping in Zapier requires either a Code step (for lists small enough to process within the step's time limit) or a recursive sub-Zap pattern (for larger lists where order and spacing matter). Looping by Zapier handles the common case of parallel iteration cleanly — but if items must wait for each other, plan for one of the other patterns before you build.

For a broader look at Zapier workflow design including branching and multi-step patterns, see multi-step Zapier workflow design. For help building a sequential processing workflow in Zapier, talk to Automation Ace.

ZapierLoopingAdvanced Zapier

Disclaimer: This article may include links to apps, products, or services. Some links may be affiliate links, which means Automation Ace may earn a commission at no extra cost to you.

Build Better Systems

Ready to automate with confidence?

Share your tools, process, and goals. Automation Ace can design the workflow, integration, AI assist, or code bridge that fits your business.

Start a Project →