Trying to use a Generic Webhook v3 to post to a Google Apps Script. Ideally Script will receive PagerDuty alert and insert into a Sheet for reporting purposes. Due to none of that working, for now the script has been simplified to just log that it has been triggered. This works fine from something like Postman but radio silence when hooked up to PagerDuty.
I haven’t had any luck getting logs from Google Apps Script so wondering if there are any logs on PD side for failed webhooks?
Failing that has anyone successfully connect PD Generic Webhook → Apps Script? Seems plausible but maybe I’m missing something.
Page 1 / 1
Hi @daveh,
I haven’t seen this setup before, but there are a few things you can check that can help you troubleshoot. I’ll share below with some links to documentation:
If it works from Postman but not PagerDuty, double-check that your endpoint is HTTPS and that you’re not blocking PagerDuty’s IPs. Also, compare the request headers and payloads.
Yes the test events is one of the main ways I’ve been trying it out. However real incidents are flowing also, I know this because PD keeps disabling the Webhook due to the some mystery problems
So PagerDuty knows there is a problem but I can’t see that information.
Make sure your Google Apps Script is deployed as a web app and set to “Anyone, even anonymous” can access.
Yep this is the case and confirmed by hitting from Postman (with no auth etc.)
Use Logger.log() in your script and check the “Executions” tab in the Apps Script editor to see if your endpoint is being hit at all.
Yes this is pretty much what it’s doing right now but despite this i get no help from the executions panel at all -- hence me trying to find some info from the PD side.
If it works from Postman but not PagerDuty, double-check that your endpoint is HTTPS
Google do not allow anything other than HTTPS.
try sending a test event from PagerDuty
Yep this has been my main trigger for testing so far but no joy.
Hi @daveh,
I’ve asked about this case internally and will get back to this topic once I get a reply.
In the meanwhile feel free to reach out to customer support, as they might be able to look into your account with more tools, and will be happy to help! You can use this topic as reference.
Let me know if you can find an answer. Enjoy your day!
hi @daveh
I couldn’t get one of these working either, but I really don’t know much about the mechanics of the Google side (or even if our account allows such things, tbh. I got a 301 and then a 404 from curl).
If you haven’t already, you could try hooking up to a generic webhook endpoint, like webhook.site, to see if there’s anything obviously different between the POSTs from Postman and PagerDuty. I’m not sure what it would be, but might be worth a look. The PagerDuty webhooks always send POSTs only, so your apps script will only really need a doPost() function.
Hopefully the team will have some more hints.
--mandi
Hey @daveh,
The team took a quick look and detected a status code 302, along with temporary disablements of the subscription. Our guess is that this is a problem with the endpoint, probably coupled with the webhook being temporarily disabled because of delivery failures.
We strongly recommend creating a customer support request to look further into this, as it’s safer to share payload and other private information on your account.
After fetching some additional data on this case, we did see a handful of webhook subscriptions whose delivery methods are set to https://script.google.com/macros/s/... , which leads us to believe your use case can work.
Please let me know if I can help with anything else, and have a nice day!
Create an account with https://tickets.pagerduty.com/s/ - this requires a password to set up and the login is not directly linked to your PagerDuty account login details, so your SSO won’t apply here.
You should also be able to open a case from the Pagey widget in the bottom right side of the UI, within your account.
Make sure to let me know if you’re able to successfully reach out to the support team!