Master Webhooks: A Guided Journey from Airtable to Zapier

Unlock the potential of webhooks with our step-by-step guide on bridging Airtable and Zapier. Dive into scripting magic and enhance your workflow automation like a pro.

Master Webhooks: A Guided Journey from Airtable to Zapier

Unveiling the magic of webhooks can significantly elevate your workflow game. This post unfolds a step-by-step guide to seamlessly bridge Airtable and Zapier like a pro. Let's dive in!

The Allure of Webhooks

I’m a fervent admirer of both Zapier and Airtable. However, the nuanced art of dispatching outbound webhooks from Airtable to trigger a Catch Hook in Webhooks by Zapier has often seemed elusive. Thankfully, some adept minds have deciphered the code, and I’m thrilled to share this knowledge. Although Zapier has a robust Airtable app integration, this nifty trick caters to specific use cases.

Setting Sail with Airtable Automations

If you haven’t yet explored the realm of Airtable automations, now’s the time. Begin your journey with a fresh Airtable automation. The process feels like reuniting with an old friend due to its striking resemblance to the cherished Zap editor.

Add an Airtable automation scripting step

The Scripting Odyssey

Next on our agenda is the exhilarating scripting step! It’s time to interweave your code and variables. A blend of code, variables, and a touch of creativity propels you towards scripting magic.

Set up the scripting step
  1. Add variables (1), and use the same keys in the code (3)(4)

  2. Add the endpoint/catch hook (2)

  3. Submit a test (5)

  4. That’s it!

We can then test the action if needed and turn on the Airtable automation.

The code to use:

1let url = "";
2let inputConfig = input.config();
3let payload = {
4 "aaa": inputConfig["aaA"],
5 "bbb": inputConfig["bbB"],
8let postOptions = {
10 method: "post",
12 headers: {
14 'Accept': 'application/json',
16 },
18 body: JSON.stringify(payload)
22await fetch(url, postOptions);

The Human Touch: Button-Triggered Webhook

Airtable automations are undeniably smooth, but there are instances where a human touch is indispensable. With a mere button click in Airtable, you can summon a catch-hook Zap, marrying automation with manual control.

Send an outbound webhook pressing a button

We’ll add a button field, and add the URL formula. The code to use:

4 &
5 '&'
7 &

This looks a little funky at first, but this is the breakdown:

  1. We’ll add the catch hook

  2. Then use the ENCODE_URL_COMPONENT() function to URL encode the parameters

  3. Each “part” you want to add needs to be added with a space, ampersand and another space

  4. The (ccc) is used to indicate which key is sent

  5. The {fff} is used to indicate the value in an Airtable field (aka column)

  6. The above code will add two params ccc and eee and have values in fields {ddd} and {fff}

  7. Click on “Save”—and now you have a fancy button!

To note:

  • Clicking a button will always open a new tab. There is no way to silently open it

  • You can replace this with a scripting button, but this will open the application panel

  • You can use a checklist button and use a view + Airtable automation to send a webhook, which solves both issues

  • The button could also be useful to prefill an Airtable form (support link here).

  • More info on URL_ENCODE_COMPONENT() can be found here.

Bonus: Retrieve Airtable Attachments with a Button

Imagine a scenario where your attachments are snugly housed in a base on Airtable, yet the need arises to have them on your local machine. The 'Download Attachment' button emerges as your knight in shining armor, forming a bridge between the two realms.

1RIGHT(LEFT({ Logo }, LEN({ Logo }) - 1), LEN(LEFT({ Logo },
2LEN({ Logo }) - 1)) - SEARCH("https://", { Logo }) + 1)
Download Airtable attachments with a button

Now, it's time to unveil a button field, gracefully linking it to the freshly minted formula field. With a simple click, the path from our Airtable base to our local machine becomes a straight run!

Set up the button

Finally, we can hide the formula field, so we can have a neat button in our Airtable base.

In Closing

I hope you find these insights helpful in your journey of mastering webhooks between Airtable and Zapier. If you have any intriguing tricks up your sleeve or if you use Airtable in a unique way, I’d love to hear about it in the comments below.