Webhook: what are we talking about?
The notions of API and webhook are gradually becoming part of the business jargon, particularly with the democratisation of Nocode.
However, it can be complicated to understand them. This is what we will try to explain in this article.
Webhook: What is it?
Often called "Reverse API" or "HTTP callback", the webhook is a tool that allows to trigger an action when a certain event occurs.
To get into the technical side of things, the webhook is actually an HTTP POST request that will send information (data) via a URL for a specific event.
This data is usually sent in a JSON data structure - which allows the tools to process it.
What are the use cases?
There are many use cases. Here are some examples:
- Create a new contact in your CRM and send a Slack notification to the sales team when a user fills out a form on your site.
- Create an invoice and send an automated email when a user buys a product on your site.
- Sending a notification to the Customer Success team when a user's trial period ends.
As you can see, webhooks are an indispensable tool today for automating high value-added tasks based on an event, otherwise known as a "trigger".
Webhook vs API: What's the difference?
It is true that one can quickly get lost among these different concepts. The webhook and the API are similar in the sense that they both allow data to be passed between two tools.
The difference is more in the "how". We saw in the previous section that the webhook was event-based. TheAPI isrequest-based. Here, we are going to query a tool to retrieve data - in the form of a GET request. This is called "polling".
Note that there are four types of requests: GET, POST, PUT, DELETE. But this is not so important for the purpose of this article.
APIs are preferred when you have to manage constant changes in data. Indeed, each time you poll the service, new information will be retrieved. One example is data from advertising campaigns such as Facebook Ads or Google Ads.
Using an API would not make sense compared to webhooks for invoice generation. Indeed, the objective here is to trigger an action instantly rather than polling the service at regular intervals to find out whether a customer has purchased a product or not.
Here is an illustration to help you visualise the mechanism and the difference.
The uses are totally different so it is not relevant to compare the two. It all depends on the purpose and the type of data you want to manipulate.
Webhook and Nocode tools ?
All this sounds good, but how does it work in practice?
For years, these tools have been called upon purely and hardly by code. Data has become so important to businesses that Python has now become the most popular language for developers. It is now the language that data engineers use to query and interrogate tools, retrieve data and automate processes.
But fortunately, the Nocode and low-code tools quickly caught up to offer users a much more accessible method of achieving the same results.
We can take the example of Zapier, Make (ex-Integromat) or n8n, the open source automation solution - which offers webhook modules.