What is a webhook and how can it automate your business

What is an API: two applications exchanging data

When you connect tools together, sooner or later the word webhook comes up. It sounds technical, but the idea is very simple, and it’s one of the pieces that saves a business the most time.

What a webhook is, explained simply

A webhook is an automatic notification one application sends to another the moment something happens. Instead of your system asking every few minutes whether there’s anything new, the other application tells it instantly.

Think of the difference between calling a shop every hour to ask if your order has arrived, and the shop texting you when it does. The webhook is that text.

Webhook or API: what’s the difference

An API is the door that lets you request or send data to an application whenever you choose. A webhook works the other way round: the application sends you data when an event occurs. In practice they’re used together: the webhook gives the alert and the API is used to fetch or update whatever is needed.

Real examples of webhooks

  • A payment gateway tells your website a payment has gone through, and the booking confirms itself.
  • Your booking system announces a new booking and a confirmation message goes out to the customer.
  • A form on your website instantly creates the customer record in your CRM.
  • Your online store announces a new order and the invoice is generated.

What to watch out for with webhooks

  • Security: check the notification really comes from who it claims to, usually with a signature.
  • Duplicates: the same notification can arrive twice, and the system mustn’t process it twice.
  • Failures: if your server doesn’t respond, you need a way to recover missed notifications.
  • Logging: keep every notification received so you can check what happened.

When a webhook makes sense for you

If part of your business has to react quickly to an event, such as a payment, a booking, a cancellation or a message, a webhook is almost always the best way to do it. It’s faster, more reliable and uses fewer resources than checking for changes at intervals.

Keep reading

Want your tools to react on their own?

Tell me what happens by hand in your business today and I’ll show you where a webhook fits.

Tell me about your project