Skip to main content

Get new record data with webhooks


Forum|alt.badge.img+1

I want to be able to get notified whenever a new record is created in one of the tables I have, since I want to be able to copy the data into Firebase Firestore using Firebase Functions. This records are created using Softr or an Airtable form.

I have been able to create a webhook and I receive the notification pings in the "target" Firebase Function, getting a very simple payload containing the webhook ID and the base ID (using the correspondent "filter" options). However, I do not know how can I get the actual data of the record. I understand I should fetch the change payloads but I don't seem to be getting it right.

5 replies

Théau12
Forum|alt.badge.img+4
  • Known Participant
  • 19 replies
  • April 10, 2023

Yes you need to call the endpoint https://api.airtable.com/v0/bases/{baseId}/webhooks/{webhookId}/payloads which will list all the payloads related to the webhook you created. And then find in the array the data you're looking for 


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8775 replies
  • April 10, 2023

Yeah, those webhooks are very tricky & nuanced, especially because they expire too. It is much easier to either use Airtable’s webhooks that are built into Automations, or simply use the very easy-to-use webhooks that are built into Make


Forum|alt.badge.img+1
  • Author
  • New Participant
  • 4 replies
  • April 10, 2023
Théau12 wrote:

Yes you need to call the endpoint https://api.airtable.com/v0/bases/{baseId}/webhooks/{webhookId}/payloads which will list all the payloads related to the webhook you created. And then find in the array the data you're looking for 


How can I determine which of the payloads from the array is the one containing the newly created record data?


Forum|alt.badge.img+1
  • Author
  • New Participant
  • 4 replies
  • April 10, 2023
ScottWorld wrote:

Yeah, those webhooks are very tricky & nuanced, especially because they expire too. It is much easier to either use Airtable’s webhooks that are built into Automations, or simply use the very easy-to-use webhooks that are built into Make


Unless I am wrong, Make/Integromat does not seem to have a clear way of detecting when a new record is created in real-time and trigger an automation based on that. Am I wrong?


Théau12
Forum|alt.badge.img+4
  • Known Participant
  • 19 replies
  • April 13, 2023
kaminoan wrote:

How can I determine which of the payloads from the array is the one containing the newly created record data?


There is a field `baseTransactionNumber` that gets incremented by one for each notification. You can keep track of it :))


Reply