Understanding the JSON Payload Configuration for Automation
For your convenience, we provide the JSON Payload configuration that must be used for creating a Webhook for Automation.
Notes: You can create the JSON Payload for a particular object by logging in to https://app.sms-magic.com and then going to Get Started > Configure > Automation.
Follow these steps to enable the JSON Payload configuration:
Navigate to Get Started > Configure > Automation and click the Generate JSON button
A pop-up window will appear that asks for details such as Module, Sender ID, Phone field, and SMS Templates
Click on the Generate JSON button to create the JSON payload configuration for setting up a webhook in Zoho CRM.
Notes: Copy and save this JSON payload to be used in creating a webhook. See the next section.
A webhooks gives you the ability to communicate with a 3rd-party application by sending an instant web notification every time an event occurs.
Follow these steps to create a webhook:
In Zoho CRM, go to Setup and click on the ‘Actions’ sub-section in the Automation section
Go to Webhooks and click on the Configure Webhook button
Complete the New Webhook form:
Name: Type a name for the webhook
URL to Notify:
Here is the URL you can use based on your data center- US > https://api.sms-magic.com/v1/zoho/webhook
EU > https://eu.api.sms-magic.com/v1/zoho/webhook
AUS > https://aus-api.sms-magic.com/v1/zoho/webhook
Method: Select POST
Description: Briefly state the purpose of the webhook
Module: Select the module for which you want to Automate and ensure it matches with the module chosen in the JSON Payload.
URL Parameters: Click on the Add Parameter under User Defined Format. Enter the Parameter Name = text. For the Description, copy and paste the JSON payload configuration that you saved in the Generate JSON step above.
Click on the Save button and your webhook is now ready to be used in a Workflow rule.
Associate the Webhook with the Workflow Rule
Follow these steps:
Go to Setup > Automation > Workflow Rules and click Create Rules
Choose the Module for which you need to create a Workflow rule, then provide the rule name and description
Select the When condition for the rule to execute. For this example, we are creating a workflow rule which will trigger an automated message to leads when a lead is created in Zoho CRM.
Select the records to which this rule should be applied
Select Webhook in Instant Actions
Select and associate the Webhook that you created
The module selected for the Workflow rule and the module selected for the Webhook should be the same.
Click on the Save button to finalize this process and associate the Webhook with the Workflow.