Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Webhooks for Records

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Sam_Bauch
5 - Automation Enthusiast
5 - Automation Enthusiast

Webhooks for records would be really useful.

Iโ€™m heavily caching Airtable data on my own server via the API, and if Airtable could notify my server when a record is updated, created, or destroyed, that would help me invalidate the cached data and re-request it.

Ultimately that would mean less calls from my server to the Airtable API, which I imagine would please Airtable.

Are webhooks on the roadmap at all?

122 Comments
Bill_French
17 - Neptune
17 - Neptune

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

Marcus_Stenbeck
4 - Data Explorer
4 - Data Explorer

I hadnโ€™t seen thatโ€”thanks! :slightly_smiling_face:

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

Bill_French
17 - Neptune
17 - Neptune

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.

Marcus_Stenbeck
4 - Data Explorer
4 - Data Explorer

Thanks, Iโ€™ll have to experiment with it and see how it works.

Noamsay
6 - Interface Innovator
6 - Interface Innovator

Do I see (user friendly) webhooks here?

image

Wray_Bowling
4 - Data Explorer
4 - Data Explorer

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:

Screen Shot 2020-09-14 at 10.09.53 AM

LukaszWiktor
6 - Interface Innovator
6 - Interface Innovator

@Wray_Bowling the Scripting app is free until March 2021.

image

LukaszWiktor
6 - Interface Innovator
6 - Interface Innovator

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:

image

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.

Dmitry_Si
4 - Data Explorer
4 - Data Explorer

@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.
image

LukaszWiktor
6 - Interface Innovator
6 - Interface Innovator

@Dmitry thatโ€™s a clever trick! :clap: