Skip to contentSkip to navigationSkip to topbar
On this page

Trigger (Start) 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 Trigger (Start) Widget begins each unique Studio Flow, and allows your Flow to respond to an incoming message, call, or a Flow initiated with the Studio REST API. You cannot delete this Widget from your Flow.

Twilio Studio Trigger Widget (Updated June 2022).

This Widget begins your Studio Flow and will route inbound communication to any Widget you attach to it.


Required Configuration for Trigger (Start)

required-configuration-for-trigger-start page anchor

The Trigger (Start) Widget requires several pieces of information to function properly. All required fields are auto-populated for you by Studio, but you can change them if you need to.

A screenshot of the default configuration for the Trigger (Start) Widget. The Flow Name is 'My first flow' and is editable. The Rest API URL and Webhook URL are auto-populated and cannot be changed, but both fields have a 'copy to clipboard' icon next to them. Below this is a section for test users, where you can add phone numbers that can test this flow.
NameDescriptionExampleDefault
Flow NameThe name of this Studio Flow.Sales Team IVRThis field defaults to the name you entered when you created this Flow through the Twilio console.
Webhook URLThe URL for this Studio Flow.https://webhooks.twilio.com/v1/Accounts/{account_sid}/Flows/{flow_sid}(link takes you to an external page)This field is auto-populated and cannot be changed.
Rest API URLThe URL where you can send a POST request to trigger an execution.https://studio.twilio.com/v2/Flows/{flow_sid}/ExecutionsThis field is auto-populated and cannot be changed.

You may wish to copy the Flow URL to the clipboard to connect it to a Twilio number or make REST API requests.


Trigger (Start) Transitions

trigger-start-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
Incoming CallAn incoming call has initiated execution of the Flow.
Incoming MessageAn incoming message has initiated execution of the Flow.
REST APIAn incoming REST API request has initiated execution of the Flow.
Incoming ConversationAn incoming Conversation has initiated execution of the Flow.

You must connect at least one Widget to at least one of these Triggers for your Studio Flow to work. The Trigger Widget does not allow custom Transition events.


Trigger (Start) Variables

trigger-start-variables page anchor

When the Trigger (Start) Widget executes, it will have stored the following variables for use throughout your Studio Flow. Depending on which inbound Trigger you use (Message, Call, Conversation, or REST API), a set of variables will be made available for use throughout your Studio Flow. For more information on working with variables in Studio, see this guide.

Incoming Message Trigger Variables

incoming-message-trigger-variables page anchor

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

NameLiquid Template Language
Account SID{{trigger.message.AccountSid}}
Body{{trigger.message.Body}}
From (User){{trigger.message.From}}
From City{{trigger.message.FromCity}}
From Country{{trigger.message.FromCountry}}
From State{{trigger.message.FromState}}
From ZIP{{trigger.message.FromZip}}
Message SID{{trigger.message.MessageSid}}
Messaging Service SID{{trigger.message.MessagingServiceSid}}
Media URL{{trigger.message.MediaUrl{N}}}
Number of Media Items{{trigger.message.NumMedia}}
To (Studio Flow Phone Number){{trigger.message.To}}
To City{{trigger.message.ToCity}}
To Country{{trigger.message.ToCountry}}
To State{{trigger.message.ToState}}
To ZIP{{trigger.message.ToZip}}
(information)

Info

The Media URL variable is used by specifying the index of the media element you want to access. For example, if a single media element was sent in the incoming message, the variable {{trigger.message.MediaUrl0}} can be used to access the URL where the media element is hosted.

Incoming Call Trigger Variables

incoming-call-trigger-variables page anchor

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

NameLiquid Template Language
Account SID{{trigger.call.AccountSid}}
API Version{{trigger.call.ApiVersion}}
Called (Studio Flow Phone Number){{trigger.call.Called}}
Caller (User){{trigger.call.Caller}}
Call Status{{trigger.call.CallStatus}}
Direction{{trigger.call.Direction}}
From (User){{trigger.call.From}}
From City{{trigger.call.FromCity}}
From Country{{trigger.call.FromCountry}}
From State{{trigger.call.FromState}}
From ZIP{{trigger.call.FromZip}}
Caller City{{trigger.call.CallerCity}}
Caller Country{{trigger.call.CallerCountry}}
Caller State{{trigger.call.CallerState}}
Caller ZIP{{trigger.call.CallerZip}}
Call SID{{trigger.call.CallSid}}
Called City{{trigger.call.CalledCity}}
Called Country{{trigger.call.CalledCountry}}
Called State{{trigger.call.CalledState}}
Called ZIP{{trigger.call.CalledZip}}
To (Studio Flow Phone Number){{trigger.call.To}}
To City{{trigger.call.ToCity}}
To Country{{trigger.call.ToCountry}}
To State{{trigger.call.ToState}}
To ZIP{{trigger.call.ToZip}}

Incoming Conversation Trigger Variables

incoming-conversation-trigger-variables page anchor

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

NameLiquid Template Language
Account SID{{trigger.conversation.AccountSid}}
Body{{trigger.conversation.Body}}
Channel SID{{trigger.conversation.ChannelSid}}
Conversation SID{{trigger.conversation.ConversationSid}}
Date Created{{trigger.conversation.DateCreated}}
From (Conversation){{trigger.conversation.From}}
Message SID{{trigger.conversation.MessageSid}}
Messaging Service SID{{trigger.conversation.MessagingServiceSid}}

REST API Trigger Variables

rest-api-trigger-variables page anchor

Variables passed in via REST API trigger will be available as Flow Data and accessible via {{flow.data.MY_CUSTOM_VARIABLE}} syntax. See the REST API page for more details.


Example: Trigger a Flow from an inbound message with Trigger (Start)

example-trigger-a-flow-from-an-inbound-message-with-trigger-start page anchor

Every Flow you create will start with a Trigger (Start) Widget. The screenshot below shows how this Widget looks when connected to a Send & Wait for Reply Widget, beginning a Flow that takes users through a simple SMS survey.

Studio Trigger.

Now that you know the basics of the Trigger (Start) Widget, why not learn how to build a complete Studio Flow? You can follow along with any of the following tutorials to see this Widget in action:

We can't wait to see what you build!

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.