Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Trigger (Start)

Studio Trigger Widget

Description:

All Flows have a Trigger Widget: this is the Widget that begins the Flow. Other Widgets are attached to this Widget, connecting to one of the three possible trigger events: Incoming Call, Incoming Message, and REST API. This Widget cannot be deleted.

Required Configuration:

Flow Name is required, and defaults to the name entered when you create the Flow. You may modify this at any time.

The webhook URL of the flow (read-only), appears in the configuration panel, in this format:

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

You can copy the Flow URL to the clipboard in order to connect it to a Twilio number or make REST API requests.

Transitions: There are three initial events connected to the Trigger Widget: Incoming Call, Incoming Message, and REST API (Incoming Request). The Trigger Widget does not allow custom Transition events.

Variables:

Inbound Message Trigger

Account SID trigger.message.AccountSid
Body trigger.message.Body
From 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 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

Account SID trigger.call.AccountSid
API Version trigger.call.ApiVersion
Called trigger.call.Called
Caller trigger.call.Caller
Call Status trigger.call.CallStatus
Direction trigger.call.Direction
From 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 trigger.call.To
To City trigger.call.ToCity
To Country trigger.call.ToCountry
To State trigger.call.ToState
To ZIP trigger.call.ToZip

REST API Trigger

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.

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 browsing the Twilio tag on Stack Overflow.