Skip to main content

Is there a way to implement throttling?

Let’s say a Zap is triggered multiple times (by webhooks) but I want all webhooks received within a certain time interval (e.g. 5s) count as one and proceed with only a single action. Is that possible?

 

I guess debounce can be achieved by using the "Delay after queue" zap but how to implement throttling?

Used terminology - https://www.telerik.com/blogs/debouncing-and-throttling-in-javascript

Hi @rocky ,

Thats a great question! I think you should be able to do this with a combination of Digest by Zapier and the Delay by zapier. What you maybe could do:

Workflow 1

  • New webhook trigger
  • Digest the webhook and it’s data
  • Retrieve a data storage item called process_digest
  • Make a filter, that only continues if process_digest is false
  • Set the process_digest to true
  • Send a webhook to another Zap workflow2

Workflow 2

  • New webhook trigger from workflow1
  • Wait 5 seconds (Delay by zapier)
  • Process the digest earlier created in workflow1
  • Set the data storage item called process_digest to false

This way you basically store all the data from the webhooks you have for ~5 seconds, and only send 1 command to the next workflow to process these all, and then basically reset everything again.

Now I haven’t tested this, I just came up with it in my mind. Please let me know if this works or if you have any other questions!

~Bjorn


Oh, that’s cool. I’ll give it a shot.

Thanks!

 

I think the article in the docs could use some discoverability improvements (perhaps adding a few keywords could help)...Something for the Zapier’s docs team to think about :)


Correct me if I’m wrong...but there is no need to have two workflows, right? Why trigger the second workflow via a webhook if its actions can be part of the first workflow?

 

 

Anyways, multi-step zaps are paid...which is sad, so I’ll have to go without throttling 😞 I’m not going to pay $20 for a single zap :D


Thats true @rocky you don’t need to have 2 workflows, its more a habit of me to keep things organized and seperated ;)

What you can do is take a look at integromat. You can do something similar there as well, but it requires a bit more knowledge to get started.
If my answer above helped you out, please mark it as answered ;)

Let me know if you have any other questions
~Bjorn


Hey there @rocky ,

 

You marked it as answered, but just wanted to make sure it actually worked. If you had to change anything, please let me know. Interested to know!

 

Cheers

~Bjorn