Twilio¶
Twilio is a messaging platform to send text messages and calls.
Why Integrate Twilio with EasyTask?¶
Twilio is the leading cloud communications platform for SMS, voice, and messaging applications. By integrating Twilio with EasyTask, you can automate SMS notifications, voice calls, and communication workflows on a configurable schedule. EasyTask enables you to send text messages, initiate phone calls, retrieve call logs, and manage phone numbers — all triggered by scheduled tasks. This integration is ideal for building automated alerting systems, scheduling customer notifications, and orchestrating multi-channel communication workflows without manual intervention.
Integration Server Vault details¶
Required secret in Vault¶
| Key | Type | Description |
|---|---|---|
| account_sid | string | Account SID for Twilio |
| auth_token | string | Auth token for Twilio |
| http_proxy | string | Proxy URL if you want to use a proxy |
Twilio Integration JSON Format¶
| Field | Type | Description | Required |
|---|---|---|---|
| is_credentials | object | Credentials for authentication | Yes |
| is_credentials.userid | string | User ID for authentication | Yes |
| is_credentials.passwd | string | Password for authentication | Yes |
| integrations | array | List of integration objects | Yes |
| integration | string | Type of integration (must be "twilio") | Yes |
| uuid | string | Unique identifier for the integration instance | Yes |
| init | object | Initialization parameters | Yes |
| init.vault_path_key | string | Path to the vault containing Twilio credentials | Yes |
| action | array | List of actions to be performed (empty in this example) | Yes |
Example cURL Commands¶
Sample Usage of Twilio¶
curl -X POST http://localhost:8008/run-integration \
-H "Content-Type: application/json" \
-d'
{
"is_credentials": {
"userid": "test",
"passwd": "test123"
},
{
"integrations": [
{
"integration": "twilio",
"uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5",
"init": {
"vault_path_key": "twilio/server1"
},
"action": [
{"make_call":{
"call_to": "+91XXXXXXXXXX",
"call_from": "+1XXXXXXXXXX",
"twiml": "<Response><Say>Ahoy, World!</Say></Response>"
}}
]
}
]
}
}'
Functions¶
make_call¶
Make a call:
This function makes a single call to a given number and says a message.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| call_to | string | The number you wish to call to | Yes |
| call_from | string | The number you wish to call from | Yes |
| twiml | string | TwiML instructions for the call Twilio will use | Yes |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the make_call action |
{
"is_credentials": {
"userid": "test",
"passwd": "test123"
},
"integrations": [
{
"integration": "twilio",
"uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5",
"init": {
"vault_path_key": "twilio/server1"
},
"action": [
{
"make_call": {
"call_to": "+91XXXXXXXXXX",
"call_from": "+1XXXXXXXXXX",
"twiml": "<Response><Say>Ahoy, World!</Say></Response>"
}
}
]
}
]
}
make_call_async¶
Make multiple calls asynchronously:
This function makes multiple calls to unique numbers with unique TwiML instructions.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| data | array[array[string, string]] | Array of arrays containing call_to numbers and TwiML instructions | Yes |
| call_from | string | The number you wish to call from | Yes |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the make_call_async action |
{
"is_credentials": {
"userid": "test",
"passwd": "test123"
},
"integrations": [
{
"integration": "twilio",
"uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5",
"init": {
"vault_path_key": "twilio/server1"
},
"action": [
{
"make_call_async": {
"data": [
["+91XXXXXXXXXX", "<Response><Say>Message 1</Say></Response>"],
["+91XXXXXXXXXX", "<Response><Say>Message 2</Say></Response>"]
],
"call_from": "+1XXXXXXXXXX"
}
}
]
}
]
}
send_message¶
Send a single message:
This function sends a single message to a specified number.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| message_to | string | The number you wish to message to | Yes |
| message_from | string | The number you wish to message from | Yes |
| body | string | The message body | Yes |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the send_message action |
{
"is_credentials": {
"userid": "test",
"passwd": "test123"
},
"integrations": [
{
"integration": "twilio",
"uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5",
"init": {
"vault_path_key": "twilio/server1"
},
"action": [
{
"send_message": {
"message_to": "+91XXXXXXXXXX",
"message_from": "+1XXXXXXXXXX",
"body": "Ahoy, World!"
}
}
]
}
]
}
send_messages_async¶
Send multiple messages asynchronously:
This function sends multiple messages to unique numbers with unique message bodies.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| data | array[array[string, string]] | List containing lists with 2 string values: number to message and message body | Yes |
| message_from | string | The number from which you wish to message | Yes |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the send_messages_async action |
{
"is_credentials": {
"userid": "test",
"passwd": "test123"
},
"integrations": [
{
"integration": "twilio",
"uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5",
"init": {
"vault_path_key": "twilio/server1"
},
"action": [
{
"send_messages_async": {
"data": [
["+91XXXXXXXXXX", "Message 1"],
["+91XXXXXXXXXX", "Message 2"]
],
"message_from": "+1XXXXXXXXXX"
}
}
]
}
]
}
get_message_logs¶
Get message logs:
This function retrieves logs for past messages.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| page_size | integer | Max number of logs to show in your request (defaults to 50) | No |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the get_message_logs action |
get_call_logs¶
Get call logs:
This function retrieves logs for past calls.
| Input Parameter | Type | Description | Mandatory |
|---|---|---|---|
| page_size | integer | Max number of logs to show in your request (defaults to 50) | No |
| Key | Type | Description |
|---|---|---|
| integration | string | The type of integration used (twilio) |
| uuid | string | Unique identifier for the integration instance |
| init | object | Initialization parameters, including vault path key |
| error | boolean | Indicates whether an error occurred during the operation |
| action | array | Contains the result of the get_call_logs action |
```sh { "is_credentials": { "userid": "test", "passwd": "test123" }, "integrations": [ { "integration": "twilio", "uuid": "ae0e8ba9-423a-410e-bba5-e1933ff868c5", "init": { "vault_path_key": "twilio/server1" }, "action": [ { "get_call_logs": {} } ] } ]
} ```
FAQ¶
What Twilio operations does EasyTask support?¶
EasyTask supports core Twilio operations including sending SMS messages, making voice calls, retrieving call logs, and managing phone numbers. You can automate multi-channel communication workflows through scheduled tasks with full Twilio API integration.
How do I automate SMS notifications with EasyTask?¶
Configure your Twilio integration by storing your Account SID and Auth Token in the EasyTask vault, then use the send_sms function within a scheduled task. You can trigger notifications based on schedules or workflow events, enabling automated alerting and customer communication.
Can I schedule recurring calls through EasyTask?¶
Yes. Use the Twilio integration's call functions within a scheduled task to initiate phone calls at specified intervals. Combined with EasyTask's scheduling engine, you can automate follow-up calls, reminder notifications, and IVR workflows on any schedule.