BlogApp Tips

What Are Webhooks and Why Would You Use Them?

What is a webhook? This is a common question among those who start to tinker with integrations and automation, and suddenly begin noticing the word here, there, and everywhere.

GitHub webhooks. Discord webhooks. Trello webhooks. And so on.

So, what are webhooks? Before we take a deep dive into the topic, let’s answer this question in the simplest possible manner.

A webhook is a way for an app to let other apps (or the users of those apps) know that something has happened. Essentially, a webhook is a notification containing data about an event, sent by one app to another app or site. 

In our guide to Discord webhooks, we use the analogy of a radar system to explain what webhooks are.

Radar systems are configured to pick up specific data, usually aircraft flying through a strip of airspace. Once they detect a signal, radars send it to a screen for the radar operator to see (or to a computer that will process and store the signal).

In this sense, webhooks are pretty much like radars, but instead of detecting flying objects, they detect online events.

The “online events” we are talking about can be pretty much anything: New rows of data being added to a spreadsheet, clicks to a link on your website, form answers being submitted by a user, and so on.

We will get back to this later down the road, as we dig deeper into all there is to know about webhooks, including:

  • Differences between webhooks and API calls
  • Webhooks examples
  • Apps that support webhooks
  • Learning resources to create your first webhook

Webhooks: The technical definition

In layman’s terms, a webhook is a way for an app to provide another app (and the app user) with real-time information about an online event.

Formally speaking, webhooks are user-defined HTTP callbacks that push data or information about an event to an URL configured for the webhook. 

The payload of a webhook is arbitrary event data (for example, answers to a web form), which are targeted (and sent) to a URL configured to receive it.

Webhooks are closely related to APIs, although their functioning principle is slightly different from API calls.

APIs operate by polling data, which means they check for new data and retrieve it when they find something.

Webhooks, on the other hand, are event-based, which means that whenever an event takes place, the webhook will send the corresponding data payload in real-time to the targeted URL.

Integromat’s scheduling function illustrates this difference in a rather simple way. For example, let’s imagine that you want to watch the tweets from a certain account you follow.

To do that, you would have to use the “Watch Tweets” module in a scenario, and then schedule the scenario to run at certain intervals (say, every 5 minutes).

Since the “Watch Tweets” module is basically an API call made to the Twitter API, it will check for data (new tweets) every five minutes. If the account you are watching has tweeted, the API call will pick up the corresponding data (i.e the new tweets).

Webhooks, on the other hand, cannot be scheduled to run at any interval because they instantaneously post data about an event the moment it takes place. 

In little words, API calls can be scheduled, and webhooks can’t.

Why would you want to use a webhook? Examples and use cases

Webhooks are another building block for digital infrastructure. They enable you to do many things in a simple fashion that is also undemanding from a technical point of view.

For example, say that you manage a company that sells luxury car subscriptions (yes, that’s a thing), and that in order to do so you have a landing page featuring a webhook-friendly form (such as Typeform, Google Forms, or a custom one) that you use to collect requests from potential customers.

You want to reach out to the prospects the moment they send an inquiry through the web form, and for that to happen you wish to be notified over a dedicated Slack channel whenever a prospect submits answers.

Webhooks would make this possible, allowing you to:

  • Get the information in real-time, and act accordingly
  • Get the information in the right place that fits your needs
  • Avoid wasting extra resources (data) to collect the information

This is an example of how webhooks can be employed, but there are others.

By using webhooks to pick up online events, you can automatically populate spreadsheets with incoming data, send notifications to different people about an event, create document templates with dynamic data, add new records to CRMs, unsubscribe people from your newsletter, create tasks on project management tools, and so on.

Most of the examples above can be achieved by creating integrations between webhooks and the corresponding apps.

For instance, say that you wish to create a contract template from data received through a webhook attached to a web form.

To achieve this, you could connect two Integromat modules together (a webhooks module and a “Create a document from a template” Google Docs module), and each time a form is received, a contract template is automatically created with the data from the corresponding form.

The key to understanding the potential of webhooks lies on the following questions:

  • Do the apps you use support webhooks?
  • If so, what can you do with the information you get from webhooks?

Answering these will open up a world of possibilities to achieve countless goals, automate zillions of menial tasks, and make the most of getting information in real-time.

Which popular apps support webhooks?

Virtually every app allows incoming data from webhooks, but not all apps allow posting data through webhooks.

Some of the most popular apps that support webhooks include:

  • Instant messaging apps like Slack (through the “Events” API)
  • Web forms like Typeform, Google Forms, JotForm, and Gravity Forms
  • CRM platforms like HubSpot and Pipedrive
  • Chatbot builders like ManyChat and Chatfuel
  • Social media platforms like Facebook and Twitter
  • Code repositories like GitHub
  • Project management tools like ClickUp, Trello, and Jira

And many others, including of course Integromat.

Given the simplicity and efficiency of webhooks as a method to send information, it’s normal to see modern business and work apps feature them in their offerings.

Webhooks learning resources

The best place to start learning more about the concept of webhooks is at the beginning of it all - that is, the seminal blog post written by software engineer Jeff Lindsay in 2007, which is available in the internet archive.

As for how to create webhooks, make sure you check the apps where you would like to implement them and see if they support webhooks.

This information is usually available in the developer docs of the apps (also, please note that some apps refer to webhooks as “outgoing webhooks”). For example, you can find Typeform’s webhooks documentation in the developer docs of the company. Usually, all it takes to find these is a quick Google search.

Now, as for how to create webhook integrations with Integromat (such as the automatic contract creation example), please refer to our dedicated help docs page.

Here, you will find step-by-step instructions on how to create and configure custom webhooks, work your way around different data formats, and how to process incoming webhook data.

If you are not interested in reading through the docs, here you will find a video tutorial on how to unlock the power of webhooks using Integromat.

To conclude, you can check our selection of pre-packed templates that feature webhooks, get inspired, and make use of them right away.

The takeaway

Returning to our initial words, it can be useful to think of webhooks as little radar systems you can deploy to automatically collect and transmit data in real-time.

Webhooks are handy shortcuts that empower citizen developers and no-coders to build more on their own, without having to rely on complicated code or connectors that are native (and limited) to individual apps and use cases.

They are a vital part of Integromat as well.

On top of creating webhooks, Integromat lets you send the incoming webhook data to 1,000+ different apps, and build spectacular automated workflows in record time.

Now that you have the concepts straight, it’s time to build. As usual, remember to start simple, and work your way up to the top.

Happy automating!

Do you like this article?
Don't forget to share it!
Share

Get started now!

Sign up for a free Integromat account today!