Best answer

Triggering with multiple webhooks

  • 29 June 2021
  • 7 replies
  • 43 views

Hey

I’m trying to trigger multiple webhooks as above.

I had 2 urls:

https://hooks.zapier.com/hooks/standard/9816288/21d88f57729a489ca7623b58ef05cc8a/

https://hooks.zapier.com/hooks/standard/9816288/52b0ff2ad1164579adb5807c37b444bb/

 

I combined both to one:

 

https://hooks.zapier.com/hooks/standard/9816288/21d88f57729a489ca7623b58ef05cc8a,52b0ff2ad1164579adb5807c37b444bb/

 

And it is not working, the trigger got ‘fired’ only if I send a webhook to the single hash, not the combined one.

 

What should I do ?

icon

Best answer by christina.d 3 September 2021, 16:58

Hi @GustavoHC! It looks like you were able to reach out to the team, which is perfect. I wanted to post their response here just in case it’s helpful to anyone:

The Zapier platform doesn't support triggering multiple webhooks at once in this way. In order to proceed you'll have to adjust your service's code to send two separate calls.

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.

7 replies

Userlevel 7
Badge +10

Hi @GustavoHC!

I’m curious about something. Those don’t look like the format of webhooks that you get from the Catch Hook trigger. I’ve seen that type of URL before, but it’s been a little while. Can you elaborate on where you’re getting those URLs? Thanks!

hey @nicksimard Thank you so much for your answer!

I’m using Zapier CLI (zapier-platform-core: 11.0.1)
At my trigger, I followed this docs: https://github.com/zapier/zapier-platform-cli#bundletargeturl
Basically, I want to store the bundle.targetUrl at my database. So I implement the subscribeHook and unsubscribeHook method:
 

const subscribeHook = (z, bundle) => {
z.console.log('subscribed to trigger - estimate.sent', bundle)
const options = {
url: `${housecallUrl}/zapier/organization/webhook_url`,
method: 'POST',
body: {
webhook_url: bundle.targetUrl
},
};

return z.request(options).then((response) => response.json);
}

Then I export my trigger like this:

module.exports = {
operation: {
perform: perform,
performList: getPerformFallBack,
performSubscribe: subscribeHook,
performUnsubscribe: unsubscribeHook,
type: 'hook',
},
key: 'estimateIsSent',
noun: 'Estimate Sent',
display: {
label: 'Estimate Sent',
hidden: false,
important: true
},
};

So I need the bundle.targetUrl to store at my database


The main issue is that at this moment, I can only store one webhook url per user, which means I need that feature of ‘firing multiple triggers with one webhook url’, by combining multiple bundle.targetURL into one (the hash thing, ex: https://hooks.zapier.com/hooks/standard/9816288/21d88f57729a489ca7623b58ef05cc8a,52b0ff2ad1164579adb5807c37b444bb/.

Currently my APP is on private mode only, (for development) Do you think if I publish this (to public) the URL from Zapier will change? 
Not sure If I’m doing something wrong here, but if I delete the subscribe/unsubscribeHook methods, and Use the manual process of copying/pasting the URL from Zapier, I can get this working.
 



 

I followed this: https://zapier.com/help/create/code-webhooks/trigger-zaps-from-webhooks#optional-trigger-multiple-zaps-with-webhooks
I know the targetURL is a bit different, I dont know why..

Userlevel 7
Badge +11

Hi @GustavoHC!

 

As you’re using the Developer platform, you may need to take a different approach. I’m going to move split your question to a new topic in the Developer Discussion section as the folks that see those threads are more familiar with how the platform works and might be able to help you figure it out :relaxed:  

Thank’you @Danvers I really hope I get an feedback soon, since our customers is really waiting for our new triggers feature.

@Troy Tessalone Hey Troy, could you help me ?

Userlevel 3
Badge +3

Hi @GustavoHC! It looks like you were able to reach out to the team, which is perfect. I wanted to post their response here just in case it’s helpful to anyone:

The Zapier platform doesn't support triggering multiple webhooks at once in this way. In order to proceed you'll have to adjust your service's code to send two separate calls.