Zap is stuck in a loop

Zaps can get stuck in “loops” where they run over and over again from the same data. Loops can quickly use up your plan tasks if they are not resolved. Zap loops can occur if:

  • You have an action in one Zap that triggers another Zap and the second Zap has an action that triggers the first Zap.
  • You have an action in a Zap that also triggers that same Zap.
  • You use a "New or Updated" trigger and the Zap updates the same record that triggered it.
Example

Two-Zap loop:

Zap 1

  • Trigger: Hubspot - New Contact
  • Action: Google Contacts - Create Contact

Zap 2:

  • Trigger: Google Contacts - New Contact
  • Action: Hubspot - Create Contact

If you use the action step in each Zap to create the same contact, these Zaps will loop, adding the same contact over and over again in both Salesforce and Google Contacts.

Single Zap loop:

Zap:

  • Trigger: Stripe - New Subscription
  • Action: Stripe - Create New Subscription

If you use the action to create the same subscription that triggered the Zap, this Zap will loop, creating the same subscription over and over again in Stripe.

Update trigger loop:

Zap:

  • Trigger: Airtable - New or Updated Record
  • Action: Airtable - Update Record (same table)

If the Zap updates the same record that triggered it, the update itself re-triggers the Zap, creating an endless loop.

Email auto-reply loop:

Zap:

  • Trigger: Gmail - New Email Matching Search
  • Action: Gmail - Send Email

If the Zap sends a reply to every new email and the trigger searches all folders (including Sent), the Zap's own replies will trigger the Zap. To avoid this, use a New Conversation trigger instead of New Message, and add in:inbox to your search query to exclude sent emails.

Note

This article is about Zap loops, where a Zap runs over and over from the same data. If you need help with the Looping by Zapier tool for iterating over line items, see Understanding Looping by Zapier.

Stop a Zap loop

If your Zap is already stuck in a loop, take the following steps immediately to stop it and prevent further task consumption:

  1. Turn off the Zap that is looping right away. If two Zaps are looping together, turn off both.
  2. Check your Zap history to confirm the loop has stopped and to review the affected runs.
  3. Review your task usage to understand how many tasks were consumed.

How to avoid a Zap loop

To prevent Zap loops, you can add unique data to the action(s) that cause the loop, then use that data in a Filter step to prevent the loop.

1. Add a unique value

Add a unique value to your action step(s) to indicate that the Zap already performed the action once.

In each action step that causes the loop:

  • Select a field to enter your unique value.
  • Use a field that will not affect your original workflow.
  • For example, if your action has a note or description field, you can add the value there.
  • Manually enter a unique value in the field.
  • Use a value that would not appear in your workflow otherwise.
  • You will use this value in your Filter step.
Example

For a two-Zap loop:

  • In the first Zap's Create Contact action step, enter a unique value like #sf in the Notes field to identify contacts created in Google Contacts from this action.
  • In the second Zap's Create Contact action step, enter #ggl in the Contact Description field to identify contacts created in Salesforce from this action.

For a single-Zap loop:

  • In the Zap's Create Subscription action step, enter a unique value like #cs in the Description field to identify contacts created in Stripe from this action.

2. Add a filter

In any Zap that causes a loop, add a Filter step before the action step(s) that caused the loop. Set up the filter to identify the unique value and stop the Zap from running if it is found. The Zap should only continue if the unique value is not found.

Example

In this step, filter using the "Does not contain" condition.

For a two-Zap loop:

  • After the first Zap's trigger step, add aFilter step.
    • Select the Contact Description field as your first filter value.
    • In the condition field, select Does not contain.
    • In the final field, enter #ggl.
  • After the second Zap's trigger step, add a Filter step.
    • Select the Notes field as your first filter value.
    • In the condition field, select Does not contain.
    • In the final field, enter #sf.

For a single-Zap loop:

  • After the Zap's trigger step, add aFilter step.
    • Select the Description field as your first filter value.
    • In the condition field, select Does not contain.
    • In the final field, enter #cs.

3. Create a field to filter on to prevent update trigger loops

If your loop is caused by a "New or Updated" trigger, add a dedicated field to filter records that have already been processed by the Zap.

  1. In your app, add a new field named "Processed by Zap".
  2. In your Zap's update action step, enter a value in the Processed by Zap field. - When the Zap runs, it will enter that value in the field.
  3. Add a Filter step after the trigger. Set the filter to only continue when the Processed by Zap field is empty.

After the action step runs, when the Zap triggers again for that record, the filter will stop because it sees a value in the Processed by Zap field. This will prevent a loop.

4. Use a find or create action for two-Zap loops

If two Zaps are syncing data between apps (for example, syncing contacts between HubSpot and Google Contacts), replace Create actions with Find or Create actions. This checks if the record already exists before creating a new one, preventing the loop from duplicating data.

  1. In each Zap, replace the Create action with the app's Find or Create action (for example, Find or Create Contact).
  2. The Zap will search for an existing record first. - If one is found, the Zap stops without creating a duplicate. - If none is found, it creates a new record.
Note

Zap loops are not a way to sync data between sources as they will repeat the same data over and over. Zapier does not support two-way syncing at this time.

Still need help?

If this article did not fix the issue, Zapier has a few other options to get you the help you need:

Was this article helpful?
27 out of 62 found this helpful