# Workflow Application: SENDMESSAGE usage

**URL:** <https://discuss.workflowgen.com/t/workflow-application-sendmessage-usage/490>\
**Category:** Workflow Applications\
**Created:** [January 11, 2017, 5:00am UTC](https://discuss.workflowgen.com/t/workflow-application-sendmessage-usage/490 "2017-01-11T05:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [January 11, 2017, 5:00am UTC](https://discuss.workflowgen.com/t/workflow-application-sendmessage-usage/490/1 "2017-01-11T05:00:00Z")

</div>

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](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.

1. In the Administration Module, click the gear icon to open the Configuration Panel.

2. In the **Instant messaging** section on the **General** tab, enter your Twilio **Account SID** , **Auth Token** , and **Sender number**.

3. Check **Logs** if you want to enable message logging.

4. In the Form Designer, add two TextBox fields: one for the message body (the `BODY` parameter) and one for the recipient’s phone number (the TO parameter).

5. On the **Mapping** tab, create the OUT values for the message body and the recipient’s phone number.

6. In the Workflow Designer, add a SENDMESSAGE action to your process.

7. On the **Parameters** tab in the **Edit action** panel, set the values of the `BODY` and `TO` parameters as the corresponding data you created for the message body and the recipient’s phone number.

8. 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.

### Required parameters

| Parameter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 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-](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](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](https://www.twilio.com/docs/api/errors/reference) |
 

\* These parameters must be associated to a Twilio account.
