Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Run Subflow


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 Run Subflow Widget allows you to invoke a Subflow from a parent Flow.

Subflow Widget.{{flow.variables.<key>}} after returning from the Subflow. Instead, these variables can be accessed from the Run Subflow Widget.

For example, if you use Set Variables in the Subflow to set foo=bar, that variable can be referenced in the parent as {{widgets.subflow_widget.foo}}.


Example: Message Navigation

example-message-navigation page anchor

This example shows the Run Subflow Widget being invoked to show a navigation message to the user. Since this navigation menu may be shown to the user more than once, having the procedure stored within a Subflow cuts down on possible duplication and provides oppotunity for use outside the current Flow.

When an incoming message triggers the Studio Flow, the Run Subflow Widget will run the Subflow that shows a navigation message. Once a response is received, the Set Variables Widget will store it and the Subflow will end execution. The main Flow continues and outputs the navigation selection back to the user. Notice that the response variable was stored within the Run Subflow Widget.

Twilio Studio Run Subflow Widget Example.Rate this page:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.