# SENDMESSAGE Workflow Application

## Overview

The **SENDMESSAGE** workflow application lets users send SMS notifications using the Twilio SMS platform; to use this application, you’ll need to set up an account on the Twilio website at <https://www.twilio.com/sms>.

## How it works

The SENDMESSAGE application requires two parameters (`BODY` and `TO`) and associating these with their corresponding IDs.

The values that correspond to the `ACCOUNT_SID`, `AUTH_TOKEN`, and `FROM` parameters are required to connect to Twilio, but these are generally configured in the **Instant messaging** section on the **General** tab in the **Configuration Panel**. However, if they have been configured in the SENDMESSAGE action in the process, these values will override any corresponding values set in the Configuration Panel.

## Parameters

### 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_MESSAGE` | 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.workflowgen.com/admin/8.0/sendmessage-workflow-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
