Zapier Looping Quick-Start Guide

Explore all the ways to setup a Zapier for each loop using the 3 native “Looping by Zapier” actions or your own custom definitions within “Code by Zapier” actions in Python or Javascript and how you can overcome Zapier’s 500 iteration or 10 second timeout limits using nested loops.

Since all the examples linked to within this post either retrieve data from or manipulate data in Google Sheets, the Zapier Google Sheets Quick-Start Guide will show you the ropes you need to take the reins!

On a related note are you interested in learning more about APIs? APIs are the foundational building blocks that power modern software ecosystems like Zapier and the Demystify the API Crash Course will explain the fundamentals and give you a hands-on introduction to making your first API requests. Check out the course using the button below 🙂

Take Tyron’s Course on Demand

Explore the Demystify the API Crash Course

“Looping by Zapier” For Each Loop

The three Zapier for each loop actions available in the "Looping by Zapier" app
The three actions available in the “Looping by Zapier” app

The inbuilt “Looping by Zapier” app has three actions that enable you to do up to 500 iterations of all the actions contained within the loop. Unfortunately, Zapier say that the only way to get more than 500 iterations is to contact their support team to get your name added to the feature request so that you will be notified when their engineers release this feature.

Can’t wait that long?

Take a look at the “Code by Zapier” For Each Loop and Nested Zapier For Each Loop sections below to see how you can iterate like its 2008!

“Create Loop From Line Items”

Flow diagram of Zapier for each loop line item iteration
Flow diagram of Zapier for each loop line item iteration

When importing data from Google Sheets using the “Find Many Spreadsheet Rows (With Line Item Support)” action the data is returned in line item format where you get an array for each column in your sheet. The Zapier Loop Through Line Items Example post will show you how to use the “Create Loop from Line Items” action to loop through the row values contained within these arrays.

“Create Loop From Text”

If the values you want to loop through are contained within text variables then you can use the “Create Loop from Text” action, as is done in the Zapier Loop Through Array from Google Sheets post, to split your text variables into arrays of values that you can then iterate through to do things like sending a personalized SMS to each person in a Google Sheet.

Example of using a Zapier for each loop to send personalized SMS to customers
Example of using a Zapier for each loop to send personalized SMS to customers

“Create Loop From Numbers”

The third and final “Looping by Zapier” action allows you to use a number range to control the iterations of your Zapier for each loop. The Zapier Loop Action post walks you through how to use the “Create Loop From Numbers” action to update rows in a Google Sheet corresponding to the numbers within your custom defined number range.

Zapier for each number in range loop overview
Zapier for each number in range loop overview

“Code by Zapier” For Each Loop

While the three “Looping by Zapier” actions are easy to configure they do have the limitation that you can only do 500 iterations at once. To circumvent this restriction you can build your Zapier for each loop into Python or Javascript code within a “Code by Zapier” action (as shown in the Zapier Nested Looping using Webhooks & Python post) with the added benefit that you now have the ability to completely customize what your loop does.

Beware though that each Zapier action has a 10 second timeout limit so if your Zapier for each loop code tries to do too many iterations at once and runs for more than 10 seconds then this “Code by Zapier” step will fail.

This is where nested loops in Zapier come in useful because you can put these “Code by Zapier” loops or “Looping by Zapier” actions within an outer loop so you can continue to iterate until all your jobs are complete.

Nested Zapier For Each Loop

Nested loops in Zapier are powerful because they allow you to overcome the 500 iteration limit of the “Looping by Zapier” action or the 10 second timeout limit imposed when looping within “Code by Zapier” actions.

The nested Zapier for each loop is contained within an outer loop formed by a “Catch Webhook” trigger event at the start and a “Send Webhook” action at the end, which passes along the necessary information for the next iteration of the outer loop to continue from where the current iteration finished off.

The Zapier Nested Looping using Webhooks & Python post shows you how to nest a Python loop.

Nesting a Python for each loop in Zapier
Nesting a Python loop in Zapier

The Zapier Loop Array with Nesting posts shows you how to nest a “Looping by Zapier” action.

Nesting a "Looping by Zapier" action in Zapier
Nesting a “Looping by Zapier” action in Zapier

Zapier For Each Loop Follow Ups

Now that you know how to create a Zapier for each loop, you are ready to add more tools to your Zapier Swiss army knife! Take a look at the posts below to learn about other Zapier features and see how they can be applied in real-world examples.

About The Author — Tyron Pretorius
Tyron Pretorius

Greetings fellow MO Pros! As a previous mechanical engineer turned marketing operations lead, I now fancy myself as a full-stack marketer capable of designing websites, writing SEO-optimized content, and doing all the tracking and automation on the backend. That being said my bread and butter is marketing operations and I love to get down and dirty with the Marketo API, Python, Zapier, and Google Scripts.

Related free workshops

The New Four Pillars of Marketing Operations

The New Four Pillars of Marketing Operations

Created with the assistance of DALL·E Introduction and Background In 2018, Edward Unthank introduced the four pillars of marketing operations, setting the stage for the management of effective marketing technology (Martech) functions. These pillars have since been the bedrock for many successful careers in marketing operations. My journey to redefine

Become a member
The Role of Front-End Martech Tools in the Age of Generative AI

The Role of Front-End Martech Tools in the Age of Generative AI

Introduction: Blending Human and Technical Perspectives in Martech Caption: Future gardens of martech will blend human and AI perspectives As a co-host of the Humans of Martech podcast, I’ve had the privilege of interviewing some of the brightest minds in marketing technology. This unique experience has provided a blend of

Become a member