Best answer

Can I have multiple triggers use a single polling action?

  • 22 November 2019
  • 3 replies
  • 1389 views

Userlevel 1

For a quick example, imagine I have N resources. I could set up each of them to have their own triggers, which would result in N API calls per poll.

But I have an endpoint which I can poll, which gives me updates on all of these resources in a single call. For example, if I GET /user/history it gives me a list of changed/added resources, and their resource type.

I think it would be a complete waste to have each resource do its own polling to the exact same url, when 1 call would be enough. I know webhooks would be the best solution, but unfortunately I don't manage the API, and they do not have support for webhooks. What I would like to do, is to define one procedure/trigger, which in turn could run other triggers. Say I have a hidden trigger called: fetchUpdates which Zapier could use to poll every x minutes, but if the user had multiple triggers for different resources, it would not start making a lot of API calls. With this I could cut API traffic down by a large factor.

The only alternative I really see at this moment, is to do the polling myself on my own resources, and use that to send a webhook to Zapier. However this would waste a lot of my resources, and don't want to have to do that. Is there any way to implement this on Zapier?


icon

Best answer by matthew 22 November 2019, 17:52

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.

3 replies

Userlevel 1

Technically this could be possible with a multi step zap, and the conditional logic option Zapier have, but these are not available on the free plan, meaning I would lose a lot of potential users.


Is this for your own developer app/integration, or are you looking to set up multiple Zaps that trigger off one call to a specific endpoint?

For your own developer app/integration: no, this isn't possible at the moment. Each Zap would make independent polling requests depending on when they were turned on and the plan the user is on (this could be every 2 minutes, for example). As you've already mentioned, using webhooks would be the ideal solution for this but I appreciate it's not viable at the moment.

For multiple Zaps that you have set up: yes, you could do this with a single polling Trigger that sends the data to multiple webhooks, and then have those other Zaps set up to catch the data using a Catch Hook Trigger with the webhooks app and take appropriate action based on that.

We have a guide on doing the above at https://zapier.com/help/create/code-webhooks/trigger-zaps-from-webhooks#trigger-multiple-zaps-with-webhooks.


Userlevel 1

@mattb its for my own developer integration. I want to make it as easy to use and efficient as possible, but it looks like I might be having to leave some redundancy in there then :(