Apr 10, 2023 12:26 AM
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.
Apr 10, 2023 02:40 AM
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
Apr 10, 2023 04:19 AM
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.
Apr 10, 2023 06:28 AM
How can I determine which of the payloads from the array is the one containing the newly created record data?
Apr 10, 2023 06:31 AM
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?
Apr 13, 2023 12:42 AM
There is a field `baseTransactionNumber` that gets incremented by one for each notification. You can keep track of it :))