Send SMS using Twilio
Table of Contents
Note: This task is applicable only to Zoho Creator.
Overview
The twilio.sms.send task is used to send messages through your Twilio account using Deluge. For example, imagine you have a Zoho Creator application to track your inventory. You can use this syntax to send SMS notification to the specified phone number through your Twilio account, whenever your inventory runs low on stock.
Syntax
<variable> = twilio.sms.send(<twilio_connection>, <to_number>, <message>);
where,
Parameter | Data type | Description |
<variable> | KEY-VALUE | is the variable which will hold the response returned by Twilio. |
<twilio_connection> | TEXT | is the name of the Twilio connection. |
<to_number> | TEXT | is the phone number to which the message will be sent. The phone number must be in the format: +<country_code><phone_number> |
<message> | TEXT | Contents of the message |
Send an SMS using Twilio
The following snippet sends the specified message to the specified number.
response = twilio.sms.send("Twilio", "+91XXXXXXXXXX", "Thank you for subscribing");
where,
Param | Explanation |
"Twilio" | is the name of the Twilio Connection |
"+91XXXXXXXXXX" | is the phone number to which the message will be sent |
"Thank you for subscribing" | is the message which will be sent |
response | is response returned as KEY-VALUE by Twilio |
Response Format
Following is a sample success response returned by Twilio:
{"status":"Success"}