This guide shows you how to integrate your Zoho CRM workflow with the CRM Messaging Voice Call API to automatically trigger outgoing calls based on a CRM event (e.g., Lead Creation).
Prerequisites
- CRM Messaging Account: You must have an active account, a purchased phone number, and a calling plan.
- API Credentials: You need your CRM Messaging API Key/Token, which can be obtained from the Developer Section of your CRM Messaging account.
- Zoho CRM Access: You need administrative rights to create and modify Workflow Rules and Webhooks.
Step 1: Define the Zoho Workflow Rule
- Navigate to Settings in Zoho CRM.
- Go to Automation $\rightarrow$ Workflow Rules.
- Click Create Rule.
- Select Module: Choose the module (e.g., Leads) where you want the call to trigger.
- Rule Name: Give it a descriptive name (e.g., “Welcome Call on New Lead”).
- Execute On: Define the trigger condition. In the transcript example, the rule is set to trigger when a Lead is Created.
Step 2: Configure the Webhook Action
The action associated with the workflow rule will be a Webhook that calls the CRM Messaging API.
- Under Instant Actions, select Webhook and click Create Webhook.
- Webhook Name: Enter a name (e.g., “CRM Messaging Voice API Call”).
- URL to Notify: This is the API endpoint.
- Method:
POST - URL:
https://campaigns.crm-messaging.cloud/api/voice-call(as per the documentation)
- Method:
- Header: Select “Add custom parameters” to include the authorization token.
- Key:
Authorization - Value:
Bearer YOUR_CRM_TOKEN(ReplaceYOUR_CRM_TOKENwith your actual token from the CRM Messaging Developer Section).
- Key:
Step 3: Configure the JSON Request Body
The API requires a specific JSON payload. Zoho allows you to send this as Raw Data.
- Under the Body section, select the Raw Data option (or equivalent JSON body type).
- Paste the JSON structure, using Zoho Merge Fields to pull dynamic data like the mobile number.
| Key | Value (Using Zoho Merge Field) | Description |
"toNumber" | ${Leads.Mobile} or ${Leads.Phone} | The recipient’s number, pulled dynamically from the Lead record. |
"fromNumber" | "13024878460" | Your purchased sender ID (must be a static, valid number). |
"content" | "Hello, this is a welcome call from CRM Messaging." | The text-to-speech message content. |
"messageType" | "text" | Specifies the type of call. |
"voice" | "Polly.Joanna" | The desired voice. |
Example Raw JSON Payload (using Zoho Merge Fields):
JSON
{
"toNumber": "${Leads.Mobile}",
"fromNumber": "13024878460",
"content": "Hello, this is a welcome call from CRM Messaging. We are glad to have you.",
"messageType": "text",
"voice": "Polly.Joanna"
}
- Save and Associate the webhook with the workflow rule.
If you want pre-recorded audio to play, then update the payload to
{
"toNumber": "${Leads.Mobile}",
"fromNumber": "13024878460",
"messageType": "audio",
"audioUrl": "https://example.com/audio.mp3"
}
Step 4: Test the Automation
- Go to the Leads module and click Create Lead.
- Enter all required information, ensuring you provide a valid mobile number in the field used for the
toNumberparameter. - Save the Lead.
- The workflow rule will trigger, the webhook will execute, and the outgoing voice call should be initiated immediately to the mobile number you provided in the lead record.