What are webhooks?
The simplest way to understand webhooks is to think of webhooks as a method of apps to communicate with each other.
Why use webhooks?
Webhooks are helpful when you want to trigger something outside of Tadabase based on something that happens inside of Tadabase. For example, you can create a webhook that when a record is created take all the record details (aka 'payload' and send that data to a pre-defined URL. What happens at the destination URL is totally up to whatever that platform is configured to do.
We'll look at a few examples shorlty to get a better idea.
Getting started with webhooks
To get started with webhooks you must first have a URL where you wish to send the payload to. For example:
- You can send a webhook to Slack which will then send a message to a user in Slack.
- Send a What's App message using Twilio What's app integration
- Add record details to a Google Sheet - see this example below.
- Send batch email using Google Scripts
- Insert many records using Google Scripts
These are just several example of destination URL's.
Webhooks are only available on the Pro plans and higher.
Once you have the URL you can add your webhook.
Adding new webhooks
Each webhook belongs to a specific data table. First select the data table then go to the Webhook section.
When you add your new webhook you'll have 3 options:
The URL is the address this webhook will be sent to.
URL must start with https://
This determines when this will be triggered. Which can be when a record is created, edited or deleted. When setting the webhook to Create only values saved will be sent in the webhook.
Only new values that were saved will be sent in the webhook together with the ID.
If the update was done using inline editing only that value with the record ID will be sent in the payload. If the record was done via a form, only the fields present in the form will be sent in the payload.
This will send the entire record all fields and values.
Webhook will run regardless of where the change originated. For example, created webhook will be triggered if you created a new record from: Builder, API, Record Rule, Form etc...
Choose to enable or disable the webhook.
For the purposes of testing we recommend using a site like webhook.site which will generate a unique URL that can listen to the webhook and show you what the payload looks like.
Copy the URL from here and paste it into your webhook, then make the necessary change in your data table.
After you've submitted the form you'll see the webhook results:
This will come in handy when trying to troubleshoot what the webhook is sending.