I had a dev group and the other day I saw them discussing how to build a Webhook system. So I replied something like
- webhook is basically data driven
- decide what event (what data change) can trigger a webhook
- decide what hooks the system support
- e.g. a new customer is created
- or a new blog is written
- an UI to register URLs (webhooks)
- using whatever server side language
- communicate via the registered URL with other systems
That should be an easy webhook system I think.
I so far don't have a real-life project to build a system like that. But I realize GraphCMS offers Webhooks on data creation, update and deletion. I think I can send email notification to subscribers when new blog publish. So I made a subscribe widget on Blog page.
To trigger email notification, In this case, I write new blog in GraphCMS, so its webhook helps to communicate with Netlify function to call Mailgun to send emails. My old website had a blog editor so I could call Mailgun just from my site on client side or server side without bothering webhooks.