4 reasons why you need webhooks 📣
Have you ever needed one app to “call” another app to update it as soon as something happens? If so, then it sounds like you need webhooks. So what are webhooks, how are they different to APIs, and why should you use them? In this article we take a look at webhooks, reasons why you should start using them, and how we handle webhooks in Workflow86.
🤔 What is a webhook?
Webhooks are a method for information and data to be sent from one application to another. A webhook is events-driven, that is, it does something (send data) when something happens e.g. send an update to application A whenever a new user signs up in application B. A webhook sends this data to the endpoint of the receiving app. Webhooks are often contrasted to APIs where data is sent in response to a request e.g. when application A asks application B for a list of all new user sign ups. To receive updates from an API will require you “poll” it, which is essentially making requests for information or data over and over again at regular intervals.
📦 Waiting for an Amazon package
APIs and webhooks sound intimidating, but the underlying concept is pretty simple. Here is one analogy that can help. Think of the incoming data as an Amazon package, Amazon is the sender, you are the receiver, and your delivery address is the endpoint. You have ordered something, and now you want to know when your package will arrive at your door. To get this information by polling an API would be the equivalent of you constantly calling Amazon and asking them “Hey, do you have any updates on my package?”. In this case, you need to actively ask the sender whether they have any information for you. Webhooks would be the equivalent of getting a text message when the delivery driver has dropped off the package at your front door. In this case, the sender automatically notifies you as soon as an event has occurred.
So now that we have established what a webhook is, here are 4 reasons why you should use webhooks.
1. Webhooks allow you to trigger actions in real-time
A webhook automates the sending of data whenever a specific event occurs, allowing data to be sent in real-time. A webhook allows you to, for example, send the answers to a form a user has just filled out as soon as they have submitted. This is handy when you also need to respond in real-time, like sending a confirmation email or triggering a workflow.
2. APIs require more resources and be fiddly to set up
Where the data you are requesting is relatively static or does not change very often, getting that data by polling an API is wasteful in the sense that most of the time you will simply get back data you already have, or get no data at all. From our Amazon package analogy, polling an API is like having to call Amazon to get any updates about your package and a lot of the time Amazon will simply respond back “nothing to update”. API polling can also be less efficient because APIs can be very fiddly to configure, requiring you make the request in a certain way or else the request will be rejected or data returned will be incorrect.
3. Webhooks are pretty simple to use
At its core, webhooks are relatively simple to set up and use and less difficult to set up than APIs. Once the source of data has exposed a webhook for a certain event, all that is really required is for you to point that webhook to the correct endpoint. This is often as easy as getting the endpoint URL and pasting it into the right text field.
4. More apps are releasing webhooks
Given that many use cases require real-time updates and achieving this via APIs is both wasteful and more difficult to build and use, we are seeing more and more apps launching their own webhooks to send and receive data using webhooks. For example, Airtable recently launched its incoming webhooks trigger, allowing users to trigger automated actions inside of Airtable when something occurs in another app. However, we are still waiting for Airtable to launch its own webhooks so it can send data and trigger actions in other apps when something happens in Airtable 😉.
🔀 Webhooks in Workflow86
We love webhooks because they essentially allow any app with a webhook to trigger a workflow in Workflow86. Our built-in webhook import component allows users to connect Workflow86 with any app with a webhook, allowing workflows to be triggered in response to real-time events. Users are guided through each step of setting up the webhook, with mapping of the incoming data into placeholders for the workflow achieved by either sending sample data from the source, or by uploading a sample. Webhooks are secured using an encrypted token, ensuring that only the correct and authorized data is received and starts a workflow.
Sign up for early access 👇
To build workflows like in this article, be sure to sign up for early access at workflow86.com/signup
We are releasing invitations to early access users in batches over the coming weeks, so sign up now to get your spot.