What is a webhook?
When writing code that integrates different services, it’s common to use webhooks.
What is a webhook?
A webhook is a POST request handler that listens for somebody to call it, and when this happens it performs some kind of work.
Let me do an example. I use Paddle to sell my Bootcamp and any time anyone signs up, my webhook is called with some JSON data.
The data includes the customer email, the customer name, the product bought.
The webhook is then responsible to add the customer to an Airtable base, and to email the customer to welcome and send them some information.
In my specific case, the webhook is a Node.js app built using Express, but it could be anything that can accept network requests, and is accessible from the Internet. I put it on a VPS, but it could also be a serverless function.
It’s common for any payment platform to offer webhooks - they process the payment, then they let you do “things” that you might need to do.
Another use case for a webhook is running tasks on a machine when you want it. For example all deployment platforms offer a webhook that you can call to trigger a new deploy.
I use that on Netlify or Cloudflare Pages. I have a IFTTT task that every day at 8AM triggers the deploy procedure, so the post that I scheduled the day before is published, as its published date is now passed.


This is key to my consistency, since I know every day at 8AM the post of my static site is going to be published. I no longer need to do it manually.
Many no-code tools allow you to use them to create automations.
They’re pretty cool.
If you think about it, webhooks are the glue that keeps the Internet together. They definitely allow me to run my business, so I’m grateful for them to exist.
download all my books for free
- javascript handbook
- typescript handbook
- css handbook
- node.js handbook
- astro handbook
- html handbook
- next.js pages router handbook
- alpine.js handbook
- htmx handbook
- react handbook
- sql handbook
- git cheat sheet
- laravel handbook
- express handbook
- swift handbook
- go handbook
- php handbook
- python handbook
- cli handbook
- c handbook
subscribe to my newsletter to get them
Terms: by subscribing to the newsletter you agree the following terms and conditions and privacy policy. The aim of the newsletter is to keep you up to date about new tutorials, new book releases or courses organized by Flavio. If you wish to unsubscribe from the newsletter, you can click the unsubscribe link that's present at the bottom of each email, anytime. I will not communicate/spread/publish or otherwise give away your address. Your email address is the only personal information collected, and it's only collected for the primary purpose of keeping you informed through the newsletter. It's stored in a secure server based in the EU. You can contact Flavio by emailing [email protected]. These terms and conditions are governed by the laws in force in Italy and you unconditionally submit to the jurisdiction of the courts of Italy.