Webhooks are a way for apps to send messages to other apps. Here, we mean apps in the broadest sense – Gmail, Facebook, PayPal, Slack.
Webhooks let these programs speak to each other and to be notified when something happens. For example; when a new payment is made in Stripe, send that data to Slack as a notification.
Glide's Webhook Action lets you send data from your app to another app. The use-cases for this are limitless but here are a few examples to give you the idea.
When a user clicks a button send the details of the current item as an email
When a user submits a form, take the attached images, convert them to files and upload them to dropbox
After a new sale is processed, send the details of that order to your accounting software.
To demonstrate how to configure a webhook, we'll set up the third scenario – sending sales info from a Field Sales app to our accounting software.
The Webhook initially requires two values.
The name can be anything that you want, but it's useful to make it descriptive so that it's clear what it's doing. Later on, you might be viewing many of your webhooks listed somewhere else and you may forget what they were for.
The URL is the address where the Webhook Action will send the data. If you're using Zapier or Integromat, you'll need to create a workflow and generate this URL first.
Your new Webhook action will be created. You'll see two values,
The password is a unique value, generated by Glide. This should definitely be used as an authentication method on the receiving end of your webhook. This prevents third parties from being able to send unwanted data to your webhook.
The next step is to add values to be sent in the Webhook.
The values you have access to will depend on your context. For us here, we have access to
Special values such as the Current Date/Time and User's Email
Column values for the current item
User profile values
You should also name the values so it's clear how to use it on the other end – where your webhook is sent.
Now that we've set up our webhook, every time a new order is processed – these values will be sent to the URL we configured and we can use that data in whatever way we like
Again, for more technical info on implementing a webhook endpoint, check out Mark's post below 👇