Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Send Message Widget


Studio uses Widgets to represent various parts of Twilio's functionality that can then be stitched together in your Studio Flow to build out robust applications that require no coding on your part.

(information)

Info

New to Twilio Studio? Check out our Getting Started Guide!

The Send Message Widget allows you to send an SMS or chat message to a user from your Studio Flow.

A simple Send Message widget, re-named 'reminder_confirm.' The widget shows a message of 'Great! I'll send a reminder tomorrow'.

_10
curl -X POST https://chat.twilio.com/v2/Services/ISxxxxxxxx/Channels/CHxxxxxxxxxx/Webhooks \
_10
--data-urlencode "Type=studio" \
_10
--data-urlencode "Configuration.FlowSid=FWxxxxxxxxx" \
_10
-u ACCOUNT_SID:AUTH_TOKEN

Once you've configured your Chat Service to use your Flow to handle messages, new messages posted in the Chat Channel will create a new Studio Execution, allowing your Studio Flow to interact with a Chat user.


Send Message Transitions

send-message-transitions page anchor

These events trigger transitions from this Widget to another Widget in your Flow. For more information on working with Studio transitions, see this guide.

NameDescription
SentThe message was successfully delivered to the recipient.
Failed to SendThe request to the Messaging API failed and the message could not be sent.

Each outbound message you send with Send Message will store the following variables for use throughout the rest of your Studio Flow. For more information on working with variables in Studio, see this guide.

Find definitions and examples for these variables at the Message Resource page.

NameLiquid Template Language
Body{{widgets.MY_WIDGET_NAME.outbound.Body}}
From{{widgets.MY_WIDGET_NAME.outbound.From}}
SID{{widgets.MY_WIDGET_NAME.outbound.Sid}}
Status{{widgets.MY_WIDGET_NAME.outbound.Status}}
To{{widgets.MY_WIDGET_NAME.outbound.To}}

The following example shows a Studio Flow that will send a message with the contents "Hello!" whenever a user messages the phone number connected to the Studio Flow.

Twilio Studio Send Message Example.Rate this page:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.