dograh/docs/voice-agent/webhook.mdx
2026-05-12 19:32:41 +05:30

50 lines
2 KiB
Text

---
title: "Webhook"
description: "Webhook node allow you to sync the result of Voice Agent runs to your external systems, like CRM or to other workflow orchestrator like Zapier or n8n."
---
## Video Tutorial
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/oqUm4lLG4eU?si=kXvOtOzvKlEYE6G0"
title="Webhook Configuration Tutorial"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
></iframe>
<Note>
You can have multiple Webhook Nodes for a single Voice Agent, if you want to sync the result of the call at multiple places.
</Note>
### Creating the Webhook Payload
The payload can contain a valid JSON, and you can reference variables while constructing that payload. You can reference below variables while constructing the payload.
- `{{workflow_run_id}}` Unique ID of the Agent run
- `{{workflow_id}}` ID of the Agent
- `{{workflow_name}}` Name of the workflow
- `{{campaign_id}}` ID of the campaign this run belongs to (empty for ad-hoc runs)
- `{{call_time}}` ISO-8601 UTC timestamp of when the call was initiated
- `{{initial_context.*}}` [Initial context variables](/core-concepts/context-and-variables#initial_context)
- `{{gathered_context.*}}` [Extracted variables](/core-concepts/context-and-variables#gathered_context)
- `{{cost_info.call_duration_seconds}}` Call duration
- `{{recording_url}}` Call recording URL
- `{{transcript_url}}` Transcript URL
For the full list of available variables, authentication options, and receiver examples, see the [Webhook Payloads developer reference](/developer/webhooks).
An example of the payload is given below
```
{
"call_id": "{{workflow_run_id}}",
"first_name": "{{initial_context.first_name}}",
"rsvp": "{{gathered_context.rsvp}}",
"duration": "{{cost_info.call_duration_seconds}}",
"recording_url": "{{recording_url}}",
"transcript_url": "{{transcript_url}}"
}
```