Loop your Zap actions

Beta

Looping is a beta feature. It’s available for use, but still in active development and may change.

Available on plans:

Free

Pro

Team

Enterprise

Looping is a tool you can use to run an action or set of actions more than once. Any action that follows a looping step will run once for each set of values input into a Create Loop step. 

Using this tool doesn't count towards your task usage.

A graph demonstrating how Looping by Zapier takes multiple values and runs them through action steps multiple times

actionEdit icon Example

You have a list of email addresses to add to your contact list, but each Add Contact action will only add 1 contact. Instead of adding multiple Add Contact actions for each contact, you can use a Looping by Zapier step followed by an Add Contact action. This will loop the Zap through the Add Contact step once for each contact in your list. This way, you only have to set up the Add Contact step once.

miscEye icon Note

 

Create a loop from text

To create a loop from single values, or single values and text:

  • Click the Action step, or click the plus + icon to add a step to your Zap.
  • Search for and select Looping by Zapier.
  • Click the Event dropdown menu and select Create Loop From Text.
  • Click Continue.
  • In the Values to Loop section, add your values to loop:
    • In the field on the left, enter the name of the value.
    • In the field on the right, click the field and select the values you want to loop through, separated by a text delimiter.
    • In the Text Delimiter field, enter the symbol or text that separates each value in your list. If nothing is entered, the Zap will use a comma by default. You can use special characters as delimiters.
  • Click Continue.
  • Click Test step. If the looping step is successful, you’ll see your field name followed by the first loop value for that field. A preview of other loop values is also shown.
    Successful test of the Create Loop From Text action
actionEdit icon Example

In this example, use the "emails" value in the next steps of your Zap.

miscEye icon Note
  • By default, commas are used as the text delimiter.
  • When you test this action, the Zap will only create the first loop. It will not create any other loops during the test.
  • You must not use the preview_loop_values field from the loop test in your Zap. It is for preview purposes only and does not appear in actual Zap runs.

 

Create a loop from line items

To create a loop from line items:

  • Click the Action step, or click the plus + icon to add a step to your Zap.
  • Search for and select Looping by Zapier.
  • Click the Event dropdown menu and select Create Loop From Line Items.
  • Click Continue.
  • In the Values to Loop section, add your values to loop:
    • In the field on the left, enter the name of the value.
    • In the field on the right, click the field and select a field with the line item values you want to loop through.
  • Click Continue.
  • Click Test step. If the looping step is successful, you’ll see your field name followed by the first loop value for that field. A preview of other loop values is also shown.
miscEye icon Note
  • You can add additional line item values to run multiple line items in the same loop. For example, if you need to add line items for price, quantity, and description to an invoice, you can add each line item value in the Create Loop step.
  • When you test this action, the Zap will only create the first loop. It will not create any other loops during the test.
  • You must not use the preview_loop_values field from the loop test in your Zap. It is for preview purposes only and does not appear in actual Zap runs.

 

Create a loop from numbers

To create a specific number of loop iterations from a range of numeric values:

  • Click the Action step, or click the plus + icon to add a step to your Zap.
  • Search for and select Looping by Zapier.
  • Click the Event dropdown menu and select Create Loop From Numbers.
  • Click Continue.
  • In the Loop Iteration Counter Start field, enter the numeric value that you want your first loop iteration to start on.
  • In the Loop Iteration Counter End field, enter the numeric value for the loop iteration you want to end with.
  • Click Continue.
  • Click Test step. If the looping step is successful, you’ll see the first number in your count. A preview of other loop iteration numbers that would be created in a live Zap is also shown.
miscEye icon Note
  • When you test this action, the Zap will only create the first loop. It will not create any other loops during the test.
  • You must not use the preview_loop_values field from the loop test in your Zap. It is for preview purposes only and does not appear in actual Zap runs.

 

Limitations

Using Loop actions with Paths

You cannot add a loop to more than one path in a Zap.

Nested loops

Nested loops are not supported. You won’t be able to turn on a Zap with more than one Looping by Zapier Step.

Using Loop actions with Sub-Zaps

Loop actions can't be added before a Return from Sub-Zap step within a Sub-Zap. When using Looping Sub-Zaps, only the first Return from Sub-Zap step will run successfully.

Maximum number of loops

You can set your looping step to run up to 500 times. If you want your Zap to loop more than 500 times, contact Zapier support to be added to the feature request.

 

Frequently asked questions

Why do I only see one loop when I test my Zap?

When you test a loop action, the Zap will only create the first loop. It will not create any other loops during the test.

When the Zap runs live, all loops will run and appear in your Zap History.

How do loops appear in Zap history?

Each loop iteration will result in a separate Zap run.

How many tasks do loops use?

  • An action that runs before the loop will appear in each Zap run but only use 1 task.
  • The looping step doesn't count towards your task usage
  • Each action step after the loop will use 1 task for each loop that runs. For example, if your loop runs 500 times, an action step after the looping step will use 500 tasks when the Zap runs.

How do I stop a loop from running in subsequent action steps?

All actions after the looping step will run for each iteration of the loop. If you don’t want an action step to loop:

  • After the last step you want to loop, add a filter step.
  • Set the filter to only continue if the value loop_iteration_is_last matches the (Boolean) Is True condition.

The filter will run in every loop but will only pass in the last loop. Any actions step after the filter will run once in the last loop and use only 1 task.

miscEye icon Note

If you want an action step to only run once, add it before the looping step, if possible. This will use less tasks and the filter step won’t be needed.

If you need additional help with setting up a Looping step in your Zap, contact Zapier support.

Was this article helpful?
17 out of 59 found this helpful