Question
What is a Twilio Studio Widget Variable?
Product
Twilio Studio
Environment
Twilio Console
Answer
A Twilio Studio widget variable is a value automatically generated and stored by a widget in your Studio Flow. Each widget (such as Make Outgoing Call, Send Message, Gather Input, etc.) creates its own set of variables based on its actions and configuration. These variables capture important information, like user input, call status, message content, or API responses, which you can reference in later steps of your flow.
How it works:
- Each widget has a unique name (e.g.,
call_user_1). - After the widget executes, its variables are available using the format:
widgets.<WIDGET_NAME>.<VARIABLE_NAME> - For example, after a Make Outgoing Call widget named
call_user_1, you can reference:-
widgets.call_user_1.To(the number called) -
widgets.call_user_1.CallSid(the unique call identifier) -
widgets.call_user_1.CallStatus(the call status)
-
Additional Information
Why use widget variables?
- They allow you to pass data between widgets, make decisions, personalize messages, and build dynamic flows without writing code.
- You can use them in conditions, messages, HTTP requests, and more.
Note: To track variable documentation for each widget, select the widget docs in the Widget Library, and scroll down to the Widget Variables section.