How it works
- Airtable sends a POST request to your Nango webhook URL when something changes in a base the webhook watches.
- Nango finds the connection whose metadata holds the notification’s
webhook.idunderwebhooks. - Nango verifies the
X-Airtable-Content-MACheader with themacSecretBase64stored for that webhook, then routes the notification to the connection.
macSecretBase64 stored for it, is rejected.
Setup
1. Create the webhook and store its secret
Create the webhook through Nango’s proxy, using your Nango webhook URL from the integration’s Webhooks section in the dashboard:id and a macSecretBase64. The secret is only returned once, so store it in the connection’s metadata right away as webhooks.<WEBHOOK-ID>, with the macSecretBase64 string as the value.
The create-webhook action template does both steps and keeps the webhooks already stored on the connection. Use it, or copy its approach in your own function.
If you store the secret through the API instead, send the full webhooks object:
Airtable webhooks expire after 7 days unless refreshed with the refresh webhook endpoint. Refreshing keeps the same id and secret. If you create a new webhook instead, store its id and secret the same way.
Handle the webhook
Once routed, you have two options:- Forward it to your app: Nango forwards the notification to your webhook URL with connection attribution. See External webhook forwarding.
- Process it in a sync: run a sync when the webhook arrives using
webhookSubscriptionsandonWebhookin a sync script. See Real-time syncs.