How it works
- You create a webhook in Folk pointing to your Nango webhook URL
- When a subscribed event occurs, Folk sends a signed POST request to Nango
- Nango verifies the signature and forwards it to your app
Setup
1. Get your Nango webhook URL
In the Nango dashboard, open your Folk integration and copy the Webhook URL. Folk’s webhook payload does not identify which account triggered the event, so Nango cannot route it to a specific connection automatically. Append?nangoConnectionId=<connectionId> to the URL to target a specific connection:
nangoConnectionId for each.
2. Create the webhook in Folk
You can create a webhook via the workspace API settings page, or via the API:3. Delete the webhook on connection deletion
If a connection is deleted in Nango but the Folk webhook remains active, Folk will continue sending notifications until you manually remove it. You can automate cleanup with apre-connection-deletion event function using the folkWebhookId stored in metadata during creation (step 2):
4. Configure the webhook secret in Nango
In the Nango dashboard, open your Folk integration settings and paste the webhook secret into the Webhook Secret field.5. Handle forwarded webhooks
When a Folk event arrives, Nango verifies the signature and forwards it to your system. The forwarded payload looks like this:1d/1h) as a safety net for missed webhooks.
If you prefer Nango to automatically run a sync when the webhook arrives (instead of forwarding it to your app), you can enable webhook processing in a sync script using
webhookSubscriptions and onWebhook.See: Real-time syncs