Copy folder Twilio "SMS" to your workspace.

There are two processes in this folder:

  1. "Sending SMS" - for sending SMS via Twilio API

  2. "Getting callback" - for getting callback with the status of SMS

How it works

The first process sends SMS and copies the request with reference = {{sid}} (unique message ID) to the second process for getting callback.

The second process receives a callback from Twilio and modifies the task in the first process by adding a status.

To send SMS via API Twilio and get a callback do the following steps in your processes:

1) Open process "Getting callback" and get callback url.

Click the node Waiting for Callback, press Copy near callback url and it will be copied to clipboard.

2) Open process "Sending SMS" and find node "Calling API". In the logic API Call settings panel paste callback url as a value for parameter StatusCallback

Please note: Replace the word "callback" with "plugins/twilio" in callback URL.

For example, you get callback url -

The parameter value StatusCallback will be -

where `CONV_ID - process ID of this hash.

Press Deploy to commit changes.

To test sending SMS switch process "Sending SMS" to View mode .

Press button + New task.

Enter the parameter values:

  • AuthToken - Your AuthToken
  • AccountSid - Your AccountSid
  • Number_to - recipient's phone number with "+" and the country code
  • Number_from - Your phone number Twilio
  • Body - text of the message (up to 1600 characters)

and press Add task.

As a result, the task will pass through the process and go to one of the final nodes (red or green).

The process is prepared to call from other processes using logic `Call Process.

In case of successful execution the following parameters will be added to the task:

  • status - message status
  • sid - unique message identifier

If API Twilio returns an error, the task will go to the escalation node and the following parameters will be added:

  • code - error code Twilio
  • message - text error Twilio
  • url_more_info - link to the website Twilio, where there is a detailed description of the caused error.

In case of error while calling API Twilio, the task will go to the escalation node and the following parameters will be added:

  • code - code error
  • message - text error

Useful links Twilio:

  • Description of input parameters of Twilio API "Sending SMS"

results matching ""

    No results matching ""

    Would you recommend to your colleagues documentation for learning?
    Please enter your email to feedback
    Thank you!