Skip to main content
Webhook actions allow your Telzino AI phone agents to interact with external systems during calls. You can fetch data, create support tickets, log calls to your CRM, and more.

Webhook Conditions

Webhooks can be triggered at different points in the call lifecycle:
ConditionWhen it TriggersUse Cases
before_callBefore the agent answersPre-fetch caller info, check CRM records, inject context
during_callWhile the call is activeCreate support tickets, real-time lookups, live integrations
after_callAfter the call endsLog to CRM, send summaries, create follow-up tasks
Limits: You can configure one before_call webhook, up to two during_call webhooks, and one after_call webhook per agent.

Adding a Webhook via Dashboard

1

Navigate to Agent Settings

Log into your account and go to Agent Settings > Functions.
2

Add Webhook Action

Click the (+) button and select Webhooks.
3

Configure the Webhook

Fill in the webhook configuration form with the required fields.

Webhook Configuration

Each webhook requires the following configuration:

Required Fields

FieldDescription
NameUnique identifier for the webhook (e.g., Create_Zendesk_Ticket)
Friendly NameHuman-readable display name
DescriptionWhat this webhook does - helps the AI understand when to use it
ConditionWhen to trigger: before_call, during_call, or after_call
HTTP MethodGET, POST, PUT, PATCH, or DELETE
URLThe endpoint to send the request to

Optional Fields

FieldDescription
HeadersHTTP headers for authentication (e.g., API keys, Bearer tokens)
ParametersData to send in the request body - AI extracts values from the conversation

How Parameters Work

Parameters are the key to making webhooks intelligent. When you define parameters:
  1. You specify the key name - What the external API expects (e.g., email, subject, priority)
  2. You provide a default/example value - Used as a fallback or guide for the AI
  3. The AI extracts actual values - During the call, the AI analyzes the conversation and fills in real values
If you leave a parameter value empty, the AI will generate an appropriate value based on the conversation context.

Example Parameter Configuration

{
  "parameters": [
    { "key": "customer_name", "value": "" },
    { "key": "email", "value": "[email protected]" },
    { "key": "issue_summary", "value": "" },
    { "key": "priority", "value": "normal" }
  ]
}
In this example:
  • customer_name and issue_summary will be extracted from the conversation
  • email defaults to [email protected] if the caller doesn’t provide one
  • priority defaults to normal unless the AI determines otherwise

Real-World Examples

Zendesk Ticket Creation

Create a support ticket in Zendesk during or after a call:
{
  "name": "Zendesk_Ticket",
  "friendlyName": "Create Support Ticket",
  "description": "Creates a support ticket in Zendesk with call details and transcript",
  "condition": "during_call",
  "method": "POST",
  "url": "https://yourcompany.zendesk.com/api/v2/tickets.json",
  "headers": [
    {
      "key": "Authorization",
      "value": "Basic YOUR_BASE64_ENCODED_CREDENTIALS"
    },
    {
      "key": "Content-Type",
      "value": "application/json"
    }
  ],
  "parameters": [
    {
      "key": "ticket",
      "value": "{\"ticket\":{\"subject\":\"AI Call - Customer Inquiry\",\"comment\":{\"body\":\"Call summary and transcript\"},\"priority\":\"normal\"}}"
    }
  ]
}
For Zendesk, use Basic authentication with your email and API token:
Authorization: Basic base64(email/token:api_token)
In JavaScript:
const credentials = btoa(`${email}/token:${apiToken}`);
const header = `Basic ${credentials}`;

Freshdesk Ticket Creation

{
  "name": "Freshdesk_Ticket",
  "friendlyName": "Create Freshdesk Ticket",
  "description": "Creates a ticket in Freshdesk after the call",
  "condition": "after_call",
  "method": "POST",
  "url": "https://yourcompany.freshdesk.com/api/v2/tickets",
  "headers": [
    {
      "key": "Authorization",
      "value": "Basic YOUR_API_KEY_BASE64"
    }
  ],
  "parameters": [
    { "key": "subject", "value": "AI Voice Agent Call" },
    { "key": "description", "value": "" },
    { "key": "email", "value": "[email protected]" },
    { "key": "priority", "value": "1" },
    { "key": "status", "value": "2" }
  ]
}

CRM Integration (Before Call)

Fetch caller information before the agent answers:
{
  "name": "CRM_Lookup",
  "friendlyName": "Lookup Caller in CRM",
  "description": "Fetches caller history and preferences from CRM before the call",
  "condition": "before_call",
  "method": "GET",
  "url": "https://api.yourcrm.com/v1/contacts/lookup",
  "headers": [
    {
      "key": "Authorization",
      "value": "Bearer YOUR_API_TOKEN"
    }
  ],
  "parameters": [
    { "key": "phone", "value": "" }
  ]
}

Post-Call Logging

Log call details to your system after the call ends:
{
  "name": "Call_Logger",
  "friendlyName": "Log Call to System",
  "description": "Sends call summary and transcript to internal logging system",
  "condition": "after_call",
  "method": "POST",
  "url": "https://api.yourcompany.com/calls/log",
  "headers": [
    {
      "key": "Authorization",
      "value": "Bearer YOUR_API_TOKEN"
    }
  ],
  "parameters": [
    { "key": "caller_phone", "value": "" },
    { "key": "call_summary", "value": "" },
    { "key": "transcript", "value": "" },
    { "key": "duration", "value": "" },
    { "key": "sentiment", "value": "" }
  ]
}

API Configuration

You can also configure webhooks via the API when creating or updating an agent. Webhooks are stored in the extensions.tools array:
curl -X POST https://dashboard.telzino.com/v1/agents \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Agent",
    "organizationId": "your-org-id",
    "greetingMessage": "Hello! How can I help you today?",
    "systemPrompt": "You are a helpful support agent...",
    "extensions": {
      "tools": [
        {
          "type": "webhook",
          "name": "Create_Ticket",
          "friendlyName": "Create Support Ticket",
          "description": "Creates a support ticket when the customer has an issue",
          "condition": "during_call",
          "method": "POST",
          "url": "https://api.helpdesk.com/tickets",
          "headers": [
            { "key": "Authorization", "value": "Bearer API_TOKEN" }
          ],
          "parameters": [
            { "key": "subject", "value": "" },
            { "key": "description", "value": "" },
            { "key": "customer_email", "value": "" }
          ]
        }
      ]
    }
  }'

Best Practices

The description helps the AI understand when to trigger the webhook. Be specific:Good: “Creates a support ticket when the customer reports a problem or needs help with their order”Bad: “Creates a ticket”
Use descriptive key names that match what your external API expects. The AI uses these names to understand what data to extract.
For optional parameters, provide sensible defaults. For required parameters where you want AI extraction, leave the value empty.
Never expose API keys in client-side code. Use environment variables or secure credential storage when possible.
Test your webhook endpoints independently before configuring them in your agent. Use tools like Postman or curl to verify they work correctly.

Troubleshooting

IssueCauseSolution
Webhook not triggeringWrong conditionVerify the condition matches when you want it to fire
Authentication errorsInvalid credentialsCheck your API key/token and header format
Missing data in requestParameters not configuredEnsure all required parameters are defined
Timeout errorsSlow external APIConsider using after_call for slow endpoints