How to fix when Zap is stuck in a loop in Zapier

Authored by: Support.com Tech Pro Team

1. Introduction

 

How to fix when Zap is stuck in a loop in Zapier

Zaps get stuck in a “loop” when they run over and over again from a single trigger event. Zap loops can occur if you have two Zaps that trigger each other, or a single Zap performs an action that is identical to the event it is triggered from.

 

Example

Zap 1: When a new contact is added to Salesforce, create a new contact in Google Contacts.

Zap 2: When a new contact is added to Google Contacts, create a new contact in Salesforce.

This causes a Zap loop as the first Zap triggers the second Zap, which then triggers the first Zap, and so on.

 

2. Resolution

1. Update a field in both Zaps

Zaps must identify what is new or old data when they are triggered, in order to run only when new data comes in.

  • In your first Zap, click Edit Template in the action step.
  • Find a field that you can update with data when an object passes through the Zap for the first time. For example, you can update a note, tag, or binary field.
  • Repeat these steps for your second Zap.

This field can be used with a filter in your other Zap to identify objects that have already passed through the Zap, which prevents a loop from occurring.

 

Example

Zap 1: When a new contact is added to Salesforce, create a new contact in Google Contacts.

In the Create Contact action step, add “#sf” to the Notes field to identify contacts created in Google Contacts from this action.

Zap 2: When a new contact is added to Google Contacts, create a new contact in Salesforce.
In the Create Contact action step, add “#ggl” to the Contact Description field to identify contacts created in Salesforce from this action.

 

 

2. Add a filter to both Zaps

Next, add a filter to each Zap to identify objects that have passed through the other Zap. The filter will stop the Zap from running if the object that triggers the Zap has passed through the other Zap.

 

Example

Zap 1: When a new contact is added to Salesforce, create a new contact in Google Contacts.

Set up the filter so the Zap only continues if "#ggl" doesn't exist in the Contact Description field on the Salesforce contact record.

Zap 2: When a new contact is added to Google Contacts, create a new contact in Salesforce.

Set up the filter so the Zap only continues if "#sf" doesn't exist in the Notes field on the Google contact record.