title | sidebarTitle | description |
---|---|---|
Receive webhooks from an API |
Receive webhooks from an API |
Step-by-step guide on how to receive webhooks from an API. |
Nango makes it easy to add support for webhooks coming from any API. If your API doesn't have off-the-shelf support, simply request it in the community; we can deliver them in <48h.
Nango currently has off-the-shelf support for webhooks coming from the following APIs:
- Github
- Hubspot
- Jira
- Linear
- Salesforce
- Slack
To send webhooks from an external API to Nango, configure webhooks on the external API portal, specifying the Nango URL to receive webhooks, which is accessible in your integration settings in the Nango UI.
When Nango receives a webhook from an external API, it notifies your app with another webhook. To set this up:
- go to the Environment Settings tab in the Nango UI
- specify a Webhook URL to which Nango will send notifications
- listen for webhooks in your backend at the specified route
Nango automatically forwards all webhooks from external APIs to your app.
Nango webhook forwards are POST requests with the following JSON body:
{
"from": "hubspot",
"type": "forward",
"connectionId": "<CONNECTION-ID>",
"providerConfigKey": "<INTEGRATION-ID>",
"payload": ... // Raw payload from Hubspot wehook
}
Additionally, syncs can be designed to process webhooks from external APIs.
Webhook-enabled syncs process relevant webhooks, resulting in the creation, update and deleting of the corresponding records in real-time.
Each modified record (following an external webhook) will trigger a separate webhook from Nango to your app. The POST request has the following body:
{
"connectionId": "<CONNECTION-ID>",
"providerConfigKey": "<INTEGRATION-ID>",
"syncName": "<SYNC-NAME>",
"model": "<MODEL-NAME>",
"responseResults": { "added": 1, "updated": 0, "deleted": 0 },
"syncType": "WEBHOOK",
"modifiedAfter": "<TIMESTAMP>"
}
Simply activate a webhook-enabled sync to benefit from these capabilities.
You can check if a sync supports external webhooks by selecting your integration, going to the Endpoints tab, selecting the sync script, and checking in the sync script settings if it supports webhooks and, if so, which webhook subscription(s).
**Questions, problems, feedback?** Please reach out in the [Slack community](https://nango.dev/slack).