> ## 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 Microsoft Dynamics 365

> Automate outbound VoiceAgent calls directly from Microsoft Dynamics 365

> [!NOTE]
>
> In this guide, you will learn how to automatically trigger a CloudTalk VoiceAgent call from Microsoft Dynamics 365 using Power Automate. The built-in **HTTP action** supports any method, URL, headers, and body, so calls can be initiated directly from Dataverse record events with no additional middleware required.

**User level**: Admin

***

## Before you start

You will need:

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

* CloudTalk API credentials (API Key and Secret) found in **Company Settings > Integrations > API** ([How to access and generate your CloudTalk API keys](https://help.cloudtalk.io/en/articles/15272380-how-to-access-and-generate-your-cloudtalk-api-keys.md))

* A Microsoft 365 / Dynamics 365 subscription with a **Power Automate Premium** license (the HTTP action is a Premium connector and it requires a paid Power Automate per-user or per-flow plan, not included in free or seeded licenses)

* Contact or Lead records with phone numbers in Dataverse

## Generate the Authorization header

CloudTalk uses Basic Authentication for API requests.

1\. Open [https://www.debugbear.com/basic-auth-header-generator](https://www.debugbear.com/basic-auth-header-generator)

2\. Enter your **CloudTalk API Key** as Username and your **API Secret** as Password

3\. Copy the generated value. It looks like: `Basic XXXXXXXXX`

## Set up the integration

### Create the Power Automate Cloud Flow

1\. Open [make.powerautomate.com](https://make.powerautomate.com) (or access it via the Dynamics 365 app) and make sure you are in the correct environment in the top-right corner (e.g. "Sales Trial")

![](https://mintcdn.com/cloudtalk/akDGinDOBsihWn_p/images/help-center/articles/15479706/d89722956beb-image.png?fit=max\&auto=format\&n=akDGinDOBsihWn_p\&q=85\&s=5602ee5a228f647b7ed356d6934df6e5)

2\. Click **+ Create** and select **Automated cloud flow**

3\. Choose the trigger. For example: **Dataverse: When a row is added, modified or deleted**

4\. Select the **Change type** (e.g. Added), **Table name** (e.g. Contacts), and **Scope** (e.g. Organization).

> [!WARNING]
>
> **Tip:** If the dropdowns are not available, delete the trigger and re-add it. Start by typing "dataverse" into the search, then select **When a row is added, modified or deleted**.

![](https://mintcdn.com/cloudtalk/akDGinDOBsihWn_p/images/help-center/articles/15479706/224bcbd3f9bb-image.png?fit=max\&auto=format\&n=akDGinDOBsihWn_p\&q=85\&s=5c89c2354e2ff4dd158f69aa1fa20195)

![](https://mintcdn.com/cloudtalk/akDGinDOBsihWn_p/images/help-center/articles/15479706/39863f9b936c-image.png?fit=max\&auto=format\&n=akDGinDOBsihWn_p\&q=85\&s=d5c47af776b3583ebe81b0d9a560bbe5)

5\. Optionally, add a **Condition** step to filter records (e.g. phone field is not empty)

### Add the HTTP Action

1\. Click **+ New step**

2\. Search for and select **HTTP**

> [!WARNING]
>
> **Note:** The HTTP connector is a **Premium** connector and requires a Power Automate Premium license. If you don't see it, your current plan may not include it.

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

3\. Configure the HTTP action:

| **Field** | **Value** |
| - | - |
| Method | POST |
| URI | `https://api.cloudtalk.io/v1/voice-agent/calls` |
| Headers | `Authorization`: `Basic XXXXXXXXX` `Content-Type`: `application/json` |

4\. Under **Body**, paste the following:

```json theme={"system"}
{  "call_number": "@{triggerOutputs()?['body/telephone1']}",  "voice_agent_id": "YOUR_VOICE_AGENT_ID"}
```

> [!WARNING]
>
> `call_number` and `voice_agent_id` are the only mandatory fields. You can also pass optional `call_properties` such as system prompt variables and output variables, depending on your VoiceAgent configuration. [Learn what to include](https://help.cloudtalk.io/en/articles/11401649-voiceagents-for-outbound-calls.md)
>
> You can also use the Power Automate **dynamic content** panel to map fields from the trigger instead of raw expressions.

5\. Click **Save**, then click **Test** to run the flow.

### Test and verify

1. Run the flow in **Test mode** with a record that has a phone number

2. Check **Run history** for a green HTTP action status (response code `200`)

3. Verify in CloudTalk that the VoiceAgent call was initiated

**You're all set!** 🚀 Your Power Automate flow will now trigger a CloudTalk VoiceAgent call whenever a Dynamics 365 record meets your chosen conditions.

> [!NOTE]
>
> 💡 **API Limits to Keep in Mind**
>
> *To avoid failures or throttling, make sure your flow handles call distribution carefully. Use delays or scheduling logic where needed, as the standard API rate limit (60 requests per minute) applies to the VoiceAgent endpoint.*

## Troubleshooting

| **Error** | **What to check** |
| - | - |
| **401 Unauthorized** | Regenerate and re-enter the Authorization header |
| **400 Bad Request** | Ensure the phone number is in E.164 format (`+1234567890`) and that `voice_agent_id` is correct |
| **Flow not triggering** | Check the trigger type, table name, and condition configuration |

***

Need help or have a question? 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 Zendesk](https://help.cloudtalk.io/en/articles/15934846-triggering-a-voiceagent-call-from-zendesk.md)
- [Triggering a VoiceAgent Call from Freshservice](https://help.cloudtalk.io/en/articles/15502021-triggering-a-voiceagent-call-from-freshservice.md)


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