Notification for webhook failing?

So we’ve got a generic question: How do we have Netlify send us notifications in case a certain webhook fails 6 times and system disables the webhook? Is this something that’s doable as i didn’t see a way to do this in the system.

Thanks!

1 Like

Hi @shift_delete, welcome to the Community!

Unfortunately, there is no alert for failed webhook notifications. I’ve not tried this but you could probably write a minimal Netlify function that you can set as your notification’s webhook, that then passes the notification to your ultimate webhook. You can then add the alerting in the function as needed.

Let me know if that helps.

Hey @shift_delete
I know this is a bit old but I’ve run into the same issue & was wondering if you’d had any luck with the support engineer’s suggestion.

Hey there, @a_nexvel :wave:

Thanks for reaching out! As Dennis suggested, did you attempt to write a function for this? Let us know :slight_smile:

@hillary I have not because I’m really having trouble wrapping my head around that.

Hey there, @a_nexvel

If you are looking for more information about how to get started with Netlify Functions, this section of the docs is a great place to start, as well as these tutorials.

@hillary Sorry, I should have been more clear. I have no problem writing functions.

For some reason the webhook I’ve made for form submissions at one point in time must have failed 6 times and was disabled. We don’t know why it failed and no one was notified. I’d like to prevent that from happening again. The webhook contains a function that sends an email with the form submission to different email addresses based off of one of the selections a user makes in the form, which is why I had to make a function instead of just using Netlify’s Email notification.

But I really don’t understand his suggestion at all.

Actually I did end up figuring something out.

1 Like

great! care to share what worked?

1 Like

@a_nexvel How did you resolve this?

I’ve really struggled with this problem. It’s making the form+function solution impractical and I don’t know how to work around it. The function will sometimes fail (all code does). Turning all proceeding notifications off because one failed one time seems crazy. It’s really killing my business which relies on this capability.

  1. If the website happens to go down for some reason, we’re now using Uptime Robot to monitor.
  2. Aside from that happening, I now have code where if an error is thrown, a function runs. That function sends me an email using SendGrid. Normally if everything goes through OK I’m using Amazon SES to send the email but I thought if for some reason Amazon SES isn’t working and that’s causing the error, I’d just do it this way. Here’s a code sandbox. vigilant-surf-m9n0x - CodeSandbox
    @newmantractorwebsite @perry
1 Like

I continue to struggle with the form notification webhook being disabled without warning/notification. This is very problematic if you want to use forms for anything somewhat business critical. Can we please get a notification when the webhook is disabled (similar to the one we get if a build fails)?

I’ve implemented my own notification via Sentry in my function however I still get burned on the webhook being disabled. I want to be notified with Netlify disabled the setting, not when my function fails since they are technically separate.

Hi @newmantractorwebsite,

Sadly there’s no update regarding this yet. We can add a feature request, but we don’t know if/when it’ll be implemented.

Just going to throw in my opinion here that we could really use a built-in notification for the webhook failing as well. I will implement some error detection on our function to email me if there is a failure but it would be REALLY nice to know when Netlify has disabled the webhook for sure.

Hi @rbradley,

Thank you for writing in. We’d update the thread once there’s any development on this.

@hrishikesh I second what @rbradley and @newmantractorwebsite are saying. I’m curious to know if there’s been any progress on this. Somehow my webhook got disabled again roughly 2 - 3 weeks ago and even though I set up an email to be sent if the function failed (see sandbox for sample code vigilant-surf-m9n0x - CodeSandbox) an email was never sent so I’m struggling to figure out where the point of failure might have been.

(a_nexvel above is me)

@hrishikesh Any update on this?

Hi @ashleynexvel,

Unfortunately, nothing significant has happened in this area. But we’d update the thread if something happens.

Hi, any update on this ?

Hey there, @RectoVersoDev :wave:

Thanks so much for reaching out! Unfortunately, we don’t have an update for you today. We will follow up on this thread when we have more to share.