SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

What Is a Twilio Studio Widget Variable?

Question

What is a Twilio Studio Widget Variable?

 

Product

Twilio Studio

 

Environment

Twilio Console

 

Answer

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.

Have more questions? Submit a request
Powered by Zendesk