Skip to content

What is a webhook?

New Course Coming Soon:

Get Really Good at Git

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.

Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. A course that helps you feel less frustrated with Git. Launching Summer 2024. Join the waiting list!

Here is how can I help you: