The Zapier loop through line items action is a godsend! For those of us who have been duct-taping together ways to loop through Google Sheets in Zapier, this action finally simplifies the process of looping through line items. Now you can perform tasks in bulk for each row in your sheet easily and quickly so you can get back to the important stuff!
This post will give an overview of the Zapier loop through line items action by using a Google Sheet of customer delivery information to send SMS and email alerts to customers if their order has been shipped. So without further ado let’s take it away!
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 🙂
The Customer Database sheet contains the First Name, Order #, Email Address, and Phone Number of each customer along with the Delivery Today? checkbox field to designate whether their order will be delivered today.
As explained in theZapier Google Sheets Quick-Start Guidethere are a few different options for importing data from Google Sheets into Zapier depending on the number of rows or the amount of data that you want to import.
For this example, it is only necessary to import a small number of rows meaning the “Find Many Spreadsheet Rows” action from the Google Sheets app can be used. As shown in the images below, when the “Lookup Column” is set to the “Delivery Today?” column and the “Lookup Value” is set to TRUE then only the rows where this condition is matched will be pulled into the “Rows Col$” fields.
Need to read in more than 10 rows at a time? Explore the different options available in theZapier Google Sheets Quick-Start Guide post so that you can choose the best option and know how to format the imported data correctly so that it can be used in subsequent actions.
Zapier Loop Through Line Items Workflow
Zapier Loop Through Line Items Action
Now that the customer information has been brought in from Step 2. each of the column values can be used in the “Values To Loop” section to form array variables, which we can then loop through. Make sure to select the “Looping by Zapier” app and the “Create Loop From Line Items” action event.
Note the 500 iteration limit that is imposed on the “Maximum Number Of Loop Iterations” field. If you have more than 500 rows to loop through then you will need to use a nested loop (see theZapier For Each Loop Quick-Start Guide).
Once the looping variables have been setup in Step 3, they can then be used in subsequent steps to supply a different value for that variable for each iteration of the loop.
One thing to note about sending SMS is that there are rate limits that apply to certain number types so if you try and exceed these limits, which is very likely when you loop through arrays, then the carrier will throttle the messages and spread them out over a longer timespan to ensure delivery. Therefore, do not expect all your SMS to be delivered right away when looping.
This throttling is implemented to prevent fraudsters and bad actors from easily being able to spam people with large amounts of SMS at once. If higher rate limits are needed you can get verified by your carrier who can then increase your rate limit or allow you to purchase another number type with higher throughput e.g. a short code number. If you want to learn more about rate limits and the pros and cons of the different number types then take a look at theMarketo SMS Marketing with Telnyx post.
Post Loop Follow Up Actions
You might have been wondering “What if there are actions that I only want to do once after the loop has ended?”.
This is where the “Continue Once Loop Complete” filter comes into play. It uses the “Loop Iteration is Last” boolean value to check if there are any more iterations of the loop to complete. Once this value is true then this filter will allow the Zap to progress to the remaining steps which will be executed once only.
Notice how the content of the email and SMS summary messages is populated using the columns from Step 2 rather than one of the loop variables from Step 3. As shown in the email and SMS inbox images below, this results in one single summary email and SMS being sent containing all the customer information for orders that will be delivered today.
What’s Next?
The Zapier loop through line items action is great but there have been 2 big limitations identified while we were working through this post:
Not being able to pull in more than 20 rows from Google Sheets at once
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.
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
Introduction When it comes to account-based marketing (ABM), your marketing team might have invested in intent data, built tailored content, and spent time targeting accounts. But is the juice worth the squeeze? You could say marketing operations teams are there in part to squeeze every last marketing dollar in order
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