Airtable automation trigger: When webhook received
  • 29 Feb 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

Airtable automation trigger: When webhook received

  • Dark
    Light
  • PDF

Article summary

Plan availability

All plan types with varying limitations

Permissions

  • Owners/Creators - Create, delete, duplicate, configure, or rename an automation and edit an automation's description.

  • Editors - View an automation's configuration or copy an automation's URL.

Platform(s)

Web/Browser, Mac app, and Windows app 

Related reading

Getting started with Airtable Automations

Understanding webhooks basics

With the incoming webhook trigger for automations, you can connect Airtable with many of the tools and products that you and your team use (whether a third-party service or an internal tool). Normally, you’d have to write custom code and spin up your own infrastructure in order to handle webhooks, but now, whenever an event fires in another product, you can tap into the full power of Airtable Automations to handle it accordingly.

The incoming webhook trigger will create a unique URL that you can use to trigger an Airtable automation. You can use this URL with another service’s webhook configuration UI, or use it directly from your own custom code (e.g. from an internal tool). When Airtable receives a request at this URL, we’ll then trigger the automation that you configured (just like our other triggers).

This enables you to integrate with services that Airtable doesn’t currently support or to programmatically trigger automations, preventing you from having to write custom code or manage your own infrastructure.

360104464473Webhooksflow-Frame1.jpg

Note

Remember that anyone who has the URL for your webhook trigger can trigger your automation. We recommend thinking carefully about how and where this URL might be shared.

Choose the incoming webhooks trigger

To start, click on Automations in the upper left corner of your base. Then, click Create an automation to begin the setup process. You can then select the “When webhook received” trigger from the list of available options.

Once you’ve selected the trigger you’ll be taken to a new screen that displays your unique webhook URL and other information.

6615685168151whenwebhookreceivedtriggerempty.jpg

Send an example webhook

To set up your webhook you’ll first need to send an example webhook to the unique URL created for you. How you send an example webhook to this address depends on the application that you’re connecting to. We’ve included an example demonstration below if you’d like to a step-by-step guide to sending an example webhook.

Sending an example webhook

  1. Start by visiting https://reqbin.com/. Paste the webhook URL (generated by Airtable) into the textbox near the top of the screen. Then, select the “Post” option.
    1500003343821enterwebhook.png

  2. Next, click the “Content tab” directly underneath where you pasted your webhook URL.

    1500003290382addcontent.png

  3. You can send over any JSON object in the test, but for sake of example we’ll use a simple object: {"Company": "Airtable"}. Once you’ve entered your JSON object you can click the blue “Send” button to send a POST request to the Airtable webhook.1500003343921sendexample.gif

  4. After you send the example webhook, you should receive a success or failure message.

Successful requests

As noted in the trigger, if your example webhook is successful you should receive a response of {“success”: true}. If you received this success response you can continue on to the next section, Test the webhook.

Failed requests

If your request failed there are a few things to help troubleshoot:

  • Check that you sent a valid JSON payload. A tool like https://jsonlint.com may be useful.

    • To add multiple variables, make sure you properly format your content as a JSON object ( i.e. {"Company": "Airtable", "Name": "Testing"}).

  • Check that your request was sent with a Content-Type header of "application/json".

  • Check that you made a POST request.

Test the webhook

Once you’ve received a successful response for the example webhook, you need to test the webhook directly in the Airtable automation. Click the “Run test” button to start the test; you’ll receive a “Test ran successfully” message after the test is complete.

360104331313runtest.gif

After running a successful test you can now add an automation action to make use of the data you want to send to the webhook. In our example, we’ll pass along the JSON object received by the webhook into Slack.

Add an automation action

The data you pass to the incoming webhook can now be used in any automation action. As a simple example, we’ll pass along the JSON object setup in the example above to Slack.

Note

For a more in-depth look at our Slack automation actions, see this article.

Start by clicking the + Add action button below the automation trigger, and select the Send message action for Slack.

6615648221079addactionscrollempty.gif

After selecting your connected Slack account, and picking a channel, you can insert the JSON object into the body of a Slack message.

6615641385367whenwebhookreceivedtriggerconfigureactionexample.gif

After customizing the Slack message and running a test, your automation is now complete and ready to be turned On.

FAQs

Do you have to send a JSON object in the example webhook?

If the Content-Type header is application/JSON, yes. The top level of the JSON-encoded data must be an object (as opposed to an array).

What request methods can be used in the example webhook?

Only POST requests can be made.

Are form-encoded payloads supported?

Yes, we support x-www-form-urlencoded payloads.

Is there a size limit on the payload request?

There's a payload size limit of 100kb per request.

Is there a limit on how many times a webhook can be triggered in a given amount of time?

There is a five-requests per-second limit when using the When webhooks received trigger.

Does Airtable handle signature verification?

Airtable does not support signature verification in the webhooks automation trigger.

What run limits do webhooks have?

Each webhook received that results in an automation run will count toward the automation run limits for your workspace plan.


Was this article helpful?