Best answer

1 Trigger use with 2 Separate Action case

  • 6 January 2021
  • 4 replies

Userlevel 1

What if person using my app, use 1 trigger for 2 separate actions (meaning 2 zaps) instead of combining them like zapier recommends. I’m developing app, and i need to address this kind of situation.


Best answer by ikbelkirasan 7 January 2021, 11:29

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 5
Badge +6

@chinbatis -

Depending on the action in your app, the zaps would likely function fine. It’s not advisable – multi-step zaps keep things cleaner and more efficient – but I don’t think it would fundamentally break anything. 

Userlevel 7
Badge +12

@chinbatis - Let’s say both of the zaps use the same app and event as a trigger:

  • If the trigger is a webhook trigger then each zap will have a different subscription URL for the same event, so they will be triggered separately, which should work in your case.
  • If it’s a polling trigger then they will both poll the API for data, so if the zap 1 detects a new element A then zap 2 will detect it too because they run separately.

Hope this helps!

Userlevel 1

Thanks @ikbelkirasan . In this case i have to  store one or more subscription url for one trigger in my database. it should be fine if i could identify which subscription is canceled when user turns off the ZAP then i have to update the database to deactivate subscription.Which kind of data i could send along with the unsubscribed callback from zapier to my system? 

Userlevel 7
Badge +12

@chinbatis - You have 2 options here:

  • Create a unique id in your database for each webhook subscription then return the id in the Subscribe function of the trigger. This will signal Zapier to save that ID, and it will be available via in the Unsubscribe function. You can then send the id to your API to remove the webhook subscription.
  • Use the subscription URL itself as the webhook identifier in your database. bundle.targetUrl is also available in the Unsubscribe function.