How to avoid a Zap loop works well with creations but not with updates. In my case, if I create a Jira ticket which gets propagated to Google Calendar as an event, I'd like to know I can ignore a trigger from Google Calendar since that update was issued by Zapier.
This means that the question we're trying to answer is “Was this zap triggered by a user or by Zapier?”
The easiest way to do this is by attaching a checksum to the update. Just like cryptographic signatures. Say we are propagating from Jira to Calendar:
Date: 2025-01-02
Description:
Hello World!
Concatenating those values and then attaching a checksum (e.g. crc32) you could propagate the Calendar event like this:
Date: 2025-01-02
Description:
Hello World!
CRC32=9C 12 95 FA
If Calendar sent back an update to Zapier, Zapier would parse the description field, extract the checksum and concatenate the date and the actual description. This way it would be able to see that the checksum hasn't changed, thus, this was a Zapier triggered update and not user triggered.
This solution has however two drawbacks:
- Description field looks ugly
- Calculating the crc32 is an extra task
#1 is hard to circumvent and I'm willing to deal with it. In fact I'm attaching a key as well at the bottom of the description to be able to find the calendar event back in Jira as a ticket. This limitation is unrelated to Zapier
#2 however could be solved. We just need a crc32 spreadsheet function and no additional task would be needed. Right now I need three tasks:
- Calculate CRC32 checksum
- Find Event (or Create)
- Update Event
The rest of the text transformations are not tasks which is great. This solution could be using 33% less tasks if such a (simple) checksum function existed.