For SMS automation, we have created a workflow rule. Now, we will create a webhook and configure it. Then, associate the webhook to the workflow rule. The workflow rule will treat this webhook as an action.
The webhook needs to be configured to interact with specific modules and determine what SMS templates to be sent depending on the condition.
In your CRM, go to “Twilio SMS Settings”
Picture - 1
Copy the Personalized SMS URL and paste it into a notepad if necessary.
For better understanding, divide the URL as shown below (Picture - 2)
Picture - 2
Paste the first portion of the link up to the question (?) mark;
For example -
https://www.zohoapis.com/crm/v2/functions/testtwilio__customsmswebhook/actions/execute? [Reference: Picture - 2]
1) In Zoho CRM, click on the Settings icon located on the top right.
Go to - Setup > AUTOMATION > Actions.
Click on Actions.
2) Click on Webhooks.
3) Click on Configure Webhook to create a new webhook.
4) Type in the name of the webhook.
5) Give a description of the webhook, please be advised the method should be Get.
6) For the URL to Notify, you need to go to the “Twilio SMS Settings” module.
Then copy and paste the URL from the Personalized SMS URL at the bottom. Discard everything after the "execute?".
For example -
https://www.zohoapis.com/crm/v2/functions/testtwilio__customsmswebhook/actions/execute?
We will be appending them in Step 9.
7) Select ‘General’ for the Authorization Type.
8) Select the Module for which you want to Automate SMS.
9) On Module Parameters which are under URL Parameters, type the Parameter Name as recordIds. For parameter value select the Module and then select the corresponding id field for Parameter Value.
10) Go to Custom Parameters and add a new line. Here you will enter the following in the Parameter Name -
auth_type, zapikey, moduleName, and smsTemplateId.
Add their respective parameters from the Personalized SMS URL.
auth_type: apikey
zapikey: <You will get this from your Personalized SMS URL>
moduleName: <Module name you want to use for>
smsTemplateId: <Your Template ID>
For smsTemplateID, you can find the ID in the URL of their respective SMS template
11) Click Refresh under Preview URL, confirm that it looks similar to the Personalized SMS URL only with the new parameters as defined in the webhook and click Save. Your webhook has been created and now we need to create some rules to trigger it.
Great! You have successfully created and configured a webhook for SMS automation