Menu

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.

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)

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.

Name Description Example Default
Flow Name The name of this Studio Flow Sales Team IVR This field defaults to the name you entered when you created this Flow through the Twilio console.
Webhook URL The URL for this Studio Flow

https://webhooks.twilio.com/v1/Accounts/
<account_sid>/Flows/<flow_sid>

This field is auto-populated and cannot be changed.
Rest API URL The URL you can POST to to trigger an execution

https://studio.twilio.com/v2/Flows/
<flow_sid>/Executions

This 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

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

Name Description
Incoming Call An incoming call has initiated execution of the Flow.
Incoming Message An incoming message has initiated execution of the Flow.
REST API An incoming REST API request has initiated execution of the Flow.
Incoming Conversation An 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

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.

Inbound Message Trigger Variables

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

Name Liquid 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}}
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}}

Inbound Call Trigger Variables

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

Name Liquid 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}}

Inbound Conversation Trigger Variables

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

Name Liquid 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}}
To (Studio Flow Phone Number) {{trigger.conversation.To}}

REST API Trigger Variables

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)

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

Learn More

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!

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more