Webhooks for Records

While limited, they now exist in triggered action scripts in case you missed this.

I hadn’t seen that—thanks! :slight_smile:

Could I use it to detect if a record was changed?

Indirectly, yes.

If you can move records in and out of a view based on changes, then you can also trigger script actions on those records that appear in a vew.

1 Like

Thanks, I’ll have to experiment with it and see how it works.

Do I see (user friendly) webhooks here?

image

1 Like

I lept into Airtable this morning as soon as I saw the word “automations.” I check this thread regularly. The UI informed me that “[I] cannot run scripts on the current billing plan.” More detail please? I want to try this feature in the most minimal sense but need to know how much it will cost me. :confused:

Documentation on what level of paid subscription is necessary in order to make a “webhook” script. I’d suggest adding a line to the price comparison page like so:

1 Like

@Wray_Bowling the Scripting app is free until March 2021.

Ok, so I figured out that it’s possible to send a webhook when a record was updated. You need to:

  1. Create a new automation
  2. Select “When record updated” as trigger
  3. Add “Run script” action with the following code:

_

let inputConfig = input.config();

let response = await fetch('https://your-webhook-url.com/', {
    method: 'POST',
    body: JSON.stringify(inputConfig),
    headers: {
        'Content-Type': 'application/json',
    },
});

You will also have to map the record fields to input variables one by one.

Here is a screenshot of my webhook automation setup:

Similarly, you can send a webhook when record was added. Just change the trigger to "When record created.

Anyway, I’m looking forward to first-class webhooks in Airtable API.

8 Likes

@LukaszWiktor you gave me an idea: tools like Integromat support mail hooks. And Gmail notifications are absolutely free (for generic email the target account needs to be a verified collaborator).
So the alternative step would be:

  • create Airtable automation as described
  • use Gmail action instead of script
  • receive triggers as emails

On Integromat’s side I fetch full information about the record and all send it further as a webcall for downstream hook.

1 Like

@Dmitry that’s a clever trick! :clap:

This would work for me except its only available for pro plans ($20/month).

I am not sure why do you need all that, Integromat already have “Watch records” module.

Because the module does the polling by timer (at least for the free tier), so it either has extremely long delays or eats up the whole actions budget in a couple of weeks.

1 Like

Hi @Dmitry_Si - can you provide any guidance on how you created the email webhook? I am also trying to avoid Integromat eating up my number of actions…

On Integromat’s side, there are different types of webhooks, I’ve created “Email Webhook”. Once created it provides a unique email address.

On Airtable’s side, I created automation to send an email when the row is added and used that email as the destination.
That’s it.

Webhook trigger is now in alpha!

image

5 Likes

The OT was about outgoing webhooks. :slight_smile:

Still waiting for that one. Would save AT’s back-end a lot of API polling.

The issue w/ the webhooks via trigger is that they’ll eat into the automation quota, potentially very quickly if there are lots of records being modified / there are multiple automations on the base. IMO webhooks should not be included in the quota.

1 Like

Outbound webhooks for CRUD operations are table stakes for developers wanting to create enterprise solutions with airtable.

Airtable announced that the scripts become free with any pricing plan. Just waiting for them to unlock the scripts. Great solution…