The internet evolves in new and exciting ways, and as more apps and work based software becomes web enabled, a growing requirement for cross-software actions has lead to the development of a number of ways services can share data and actions with each other.
What is a webhook?
A webhook is a HTML coded action triggered by an event. It allows two web enabled services to update or act with information embedded in the code. An event in one application triggers a webhook which results in an event in another application. For example, when a customer signs up for your email newsletter, you can create a webhook that sends that information into your Customer Relationship Manager.
Webhooks are customisable and often don't require programming knowledge to use. They can be set up between a large number of commonly used applications such as Stripe, Discord, Slack, and Telegram (and more advanced functionality can be done using services like Integromat, Zapier and IFTTT). For example, if a payment fails in Stripe, this could trigger a webhook to your CRM (Customer Relationship Management) app updating details on the failed payment (Stripe also has great documentation supporting the use of webhooks).
Setting up webhooks for situations like this are really useful as they help to automate largely repetitive tasks. Maybe that's creating a task so the sales team can follow up on a failed payment, maybe it's updating a CRM with a new lead from the website. At AimHigher we use webhooks for a lot of these situations, and for many more like generating tasks to follow up after meetings, to get in touch with customer referrals, even to schedule tasks to read and approve our blog content!
Webhook are popular because they are generated by an event, when the event happens it triggers a webhook to expire. Other methods of data exchange tend to use polling, which means a constant check by the receiving app to see if there is an update. This can take a lot of unnecessary work if it's checking regularly (eg. every 5 minutes) or can miss something if it's checking at longer intervals (eg. every 24 hours).
Looking at real world examples polling is similar to continually checking the mailbox to see if a parcel has been delivered. We could go out and check the mailbox every 5 minutes, but that's going to take up a lot of time, or we could just check once a day but that might mean that the parcel has been sitting in the mailbox for hours. Alternatively, a webhook would be that we get an SMS when the parcel has been delivered, and we can go straight out and get it, without unnecessary checks, or missing it for hours.
Webhooks are super customisable. Not only can you set them to be triggered by all sorts of events, but you can customise what they do when the event occurs, for example you can use them to send notifications to chat programs such as Discord or Slack, so you know that something has happened (eg. your parcel has been delivered). You can also use them to create tasks in your project management system, or your todo list application. This can be useful for when an event might require an action on your part, maybe a customer has filled in a form that you now need to action, or maybe another team member has written a blog post that you need to read and approve. Sometimes webhooks can also be used to completely automate a process, and you don't need to do anything about it, like when a customer signs up in a form on the website and it creates a new person in the CRM, there's nothing for us to do there and we can completely automate the data coming from the form into the CRM.
Are webhooks secure?
The answer is that they can be, but it depends on how they've been set up. There are a few different ways that you can do this, most often by requiring a secret token to be a part of the webhook, to confirm that it came from the right place. A lot of the time services will do this automatically, but it's always worth checking if a webhook has been secured properly, especially if you're dealing with customers' private data, like phone numbers, email addresses or credit card details.
Why would I want to use webhooks?
We've already gone through a few examples of what you can use webhooks for, and there are an infinite number of other situations that they can be used for, it depends heavily on what your business has need for and where things can be automated. Here are a few examples of how we use webhooks at AimHigher:
- Create a task in our CRM to follow up after a meeting
- Create a task to review and approve blog posts
- Create a task to follow up after a new website launch
- Convert email notifications to Discord notifications when a website has an alert
- Compile feedback submitted via a form after a workshop
- Trigger the website to update when a new blog post is published.
How do I use a webhook?
A lot of the time you're probably already working with webhooks without actually knowing it. When you link two services together (eg. your accounting system and CRM), it's probably actually using webhooks under the hood.
If there isn't an easy way to link the two things up, the next way is to work out how you want to set up your webhook. There'll be a way to write the code yourself, but these days there are plenty of third party services that make it much faster and easier for anyone to set this up, regardless of their technical skills. There options such as Integromat, Zapier, IFTTT and Power Automate, and while most of the main features are the same, it depends on what you're after and what you want to be able to link up.
Once you've picked your service to setup webhooks (or you're doing it yourself), it's just a case of deciding what you want to hook up first! And from there, the sky's the limit!