The SENDMESSAGE workflow application lets users send SMS notifications using the Twilio SMS platform. To use SENDMESSAGE, you’ll first need to set up a Twilio account at https://www.twilio.com/sms.
In this tutorial, we’ll configure WorkflowGen to use Twilio, then add fields to a form that will let users send SMS messages.
-
In the Administration Module, click the gear icon to open the Configuration Panel.
-
In the Instant messaging section on the General tab, enter your Twilio Account SID, Auth Token, and Sender number.
Note: You can configure these parameters directly in individual SENDMESSAGE actions; in this case, these will override any corresponding values set in the Configuration Panel.
-
Check Logs if you want to enable message logging.
-
In the Form Designer, add two TextBox fields: one for the message body (the
BODYparameter) and one for the recipient’s phone number (the TO parameter). -
On the Mapping tab, create the OUT values for the message body and the recipient’s phone number.
-
In the Workflow Designer, add a SENDMESSAGE action to your process.
-
On the Parameters tab in the Edit action panel, set the values of the
BODYandTOparameters as the corresponding data you created for the message body and the recipient’s phone number. -
You can add optional parameters on the Parameters tab by clicking the + in the Additional parameters section (see the Optional parameters table below), then mapping their values in the Form Designer.
Note: If you add
ACCOUNT_SID,AUTH_TOKEN, and/orFROMparameters here, these values will override any corresponding values set in the Configuration Panel.
Required parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
BODY
| Text | IN | Message text |
TO
| Text | IN | Recipient’s phone number, which must contain the country code (using a + before the country code is optional, e.g. +15551234567) |
Optional parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
ACCOUNT_SID
| Text | IN | Account security identifier * |
AUTH_TOKEN
| Text | IN | Account authentication token * |
FROM
| Text | IN | Sender’s phone number, which must contain the country code (using a + before the country code is optional, e.g. +15551234567) * |
MESSAGE_SID
| Text | OUT | Alphanumeric code returned to identify successfully sent messages; for more information, see https://support.twilio.com/hc/en-us/articles/223134387-What-is-a-Message-SID- |
ERROR_MESSSAGE
| Text | OUT | Message returned in case of error; for a list of Twilio error messages and codes, see https://www.twilio.com/docs/api/errors/reference |
ERROR_CODE
| Text | OUT | Error code returned in case of error; for a list of Twilio error messages and codes, see https://www.twilio.com/docs/api/errors/reference |
* These parameters must be associated to a Twilio account.