> ## Documentation Index
> Fetch the complete documentation index at: https://help.cloudtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggering a VoiceAgent Call from Zendesk

> Automate VoiceAgent calls from Zendesk Triggers and Automations

> [!NOTE]
>
> You can automatically trigger a CloudTalk VoiceAgent call from Zendesk Triggers or Automations. Zendesk natively supports Basic Authentication in its Webhooks configuration, so no middleware is required. This guide shows you how to set up the webhook, connect it to a trigger, and verify the call was initiated.

**User level**: Admin

***

## Before you start

You will need:

* A CloudTalk VoiceAgent already created (note the VoiceAgent ID)

* CloudTalk API Key and Secret (**Settings > API Keys**)

* Zendesk Support Professional plan or above

* Contact/requester records with a phone number

## Set up the integration

### Create the Webhook

1. In Zendesk Admin Center, go to **Apps and integrations > Webhooks**.

2. Click **Create webhook**.

   ![](https://mintcdn.com/cloudtalk/8FCfL6QWpEnHvO8c/images/help-center/articles/15934846/b1a87fcbfc33-image.png?fit=max\&auto=format\&n=8FCfL6QWpEnHvO8c\&q=85\&s=3b3b2435d5b92b81e7ff3e70e6d73eac)

3. Select **Trigger or automation** and click **Next**.

   ![](https://mintcdn.com/cloudtalk/8FCfL6QWpEnHvO8c/images/help-center/articles/15934846/d66feedd2495-image.png?fit=max\&auto=format\&n=8FCfL6QWpEnHvO8c\&q=85\&s=506cf3c3e35dd681833fb33a90c56c46)

4. Configure the webhook:

   * **Name:** CloudTalk VoiceAgent

   * **Endpoint URL:** `https://api.cloudtalk.io/v1/voice-agent/calls`

   * **Request method:** POST

   * **Request format:** JSON

   * **Authentication:** Basic authentication

     * **Username:** your CloudTalk API Key

     * **Password:** your CloudTalk API Secret

   ![](https://mintcdn.com/cloudtalk/8FCfL6QWpEnHvO8c/images/help-center/articles/15934846/6295a2943f0e-image.png?fit=max\&auto=format\&n=8FCfL6QWpEnHvO8c\&q=85\&s=78c8949f05e2337d22167fae3481702c)

5. Click **Create webhook > Finish Setup**.

> [!NOTE]
>
> Zendesk handles Base64 encoding of the credentials automatically when Basic authentication is selected.

### Create the Trigger

1. In Admin Center, go to **Objects and rules > Business rules > Triggers** (or **Automations**).

2. Click **Create trigger**.

   ![](https://mintcdn.com/cloudtalk/8FCfL6QWpEnHvO8c/images/help-center/articles/15934846/e30863086760-image.png?fit=max\&auto=format\&n=8FCfL6QWpEnHvO8c\&q=85\&s=45848cc42f215461c9dbbff9d8c3c689)

3. Enter a **Trigger name** (e.g. Ticket Solved).

4. Choose a **Trigger category**: create a new category or pick any existing one that fits.

5. Set your **Conditions** (e.g. Ticket > Status > Is > Solved).

   ![](https://mintcdn.com/cloudtalk/akDGinDOBsihWn_p/images/help-center/articles/15934846/036d3ef902d4-image.png?fit=max\&auto=format\&n=akDGinDOBsihWn_p\&q=85\&s=15d81021252741ab2093e78d05d3fba1)

6. Under **Actions**, click **Add action** and select **Notify active webhook**.

7. Select the webhook you created in Step 1. A JSON body text box will appear.

8. Enter your JSON payload in the text box. Use the Zendesk placeholder `#{{ticket.requester.phone}}` to map the requester's phone number to `call_number`:

   ![](https://mintcdn.com/cloudtalk/8FCfL6QWpEnHvO8c/images/help-center/articles/15934846/bd395bb986f2-image.png?fit=max\&auto=format\&n=8FCfL6QWpEnHvO8c\&q=85\&s=abcee019a5e4d70d2fa724ad55563348)

```json theme={"system"}
{
  "call_number": "#{{ticket.requester.phone}}",
  "voice_agent_id": "YOUR_VOICE_AGENT_ID"
}
```

> [!NOTE]
>
> `call_number` and `voice_agent_id` are the only mandatory fields. Additional `call_properties`, such as system prompt variables and output variables, are optional and depend on your VoiceAgent configuration. [Learn what to include](https://help.cloudtalk.io/en/articles/11401649-voiceagents-for-outbound-calls.md).

9. In the bottom right, set the trigger to **Active** and click **Create**.

### Test and verify

1. Update a test ticket so it meets the trigger conditions.

2. Go to **Apps and integrations > Webhooks > CloudTalk VoiceAgent > Activity** to confirm the delivery.

3. In CloudTalk, verify the VoiceAgent call was initiated.

**You're all set!**

Zendesk will now automatically trigger a CloudTalk VoiceAgent call whenever a ticket meets your chosen conditions.

## Troubleshooting

If the call was not initiated, go to **Apps and integrations > Webhooks > CloudTalk VoiceAgent > Activity** to see why the delivery failed.

The most common reasons are:

* **Authorization**: incorrect CloudTalk API credentials in the webhook

* **Phone format**: the number isn't in E.164 format (`+1234567890`)

* **Incorrect VoiceAgent ID**: the wrong `voice_agent_id` was sent

* **Webhook not triggered**: the trigger isn't active, or its conditions weren't met

***

*Need help or have a question?* Just reach out through our [Support portal](https://support.cloudtalk.io/hc/en-us/requests/new?ticket_form_id=26305535257884) — we're here for you.


## Related topics

- [Triggering a VoiceAgent Call from Freshdesk](https://help.cloudtalk.io/en/articles/15457387-triggering-a-voiceagent-call-from-freshdesk.md)
- [Triggering a VoiceAgent Call from Freshservice](https://help.cloudtalk.io/en/articles/15502021-triggering-a-voiceagent-call-from-freshservice.md)
- [Triggering a VoiceAgent Call from Pipedrive](https://help.cloudtalk.io/en/articles/15516233-triggering-a-voiceagent-call-from-pipedrive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.