Menu

Studio FAQ

What limits are present within Studio?

Limits may be encountered when the size of a Flow, Execution, or Execution duration increases. Design Flows that take advantage of reusable Subflows to reduce Widget counts. Additionally, ensure that logical behavior within a Flow such as loops and repeated Widget executions conforms to the limitations listed.

  • A Flow is limited to 1,000 Widgets — publishing a Flow larger than this is not possible.
  • An Execution will end after 1,000 Steps.
  • An active Execution will end after 30 days.
  • When creating loops that cycle through the same Widgets within a Flow, note that a loop may repeat until the 1,000 Step limit for an Execution is reached
  • A Flow Execution will be stopped if the same Widget is executed 10 times in a row.
  • Liquid Template Language loops are restricted to 15 iterations.
  • Simultaneous Executions, where the same contact is involved in more than one active Execution, are not possible.

Why is my Split Based On... Widget not detecting a condition?

Some common problems encountered when using the Split Based On... Widget are unexpected speech results and numeric comparisons.

If numeric comparisons are being made, verify that the input value is a number and not a string representation. The value will have quotations around it when it is a string — an example being “1” instead of 1. To convert this value to a number, use the Liquid filter to add 0 as shown here:

{{flow.variables.numericVariable | plus: 0}}

flow.variables.numericVariable can be substituted for the variable that holds your value.

If a speech result is being evaluated from the Gather Input on Call Widget, punctuation (including spaces) may be affecting the result. For example, this Flow asks the user for speech input and checks if the user said “yes” or “no”:

Twilio Studio FAQ Split Based On... Widget

The Split Based On... Widget checks if the gathered speech result is equal to “Yes”. When running the Flow and speaking “Yes” into the call, the response of “Said no!” is delivered. Why is this?

Twilio Studio FAQ Split Based On... Widget 2

The Log for the Execution shows that “Yes.” was registered as the speech input instead of “Yes”, which was being checked for in the Split Based On... Widget. Eliminate periods added to the end of input using the following Liquid Template Language to solve this issue:

{{widgets.gather_1.SpeechResult | replace:'.' ,''}}

Replace widgets.gather_1.SpeechResult with the variable representing the speech input collectected in your own Flow. Alternatively, use the "Contains" predicate for the Split Based On... Widget to check if the input value simply has “Yes” within it instead of checking for the exact value.

If the "Matches Any Of" predicate is used, try adding the word with a period at the end as one of the options to compensate for unwanted punctuation added at the end of the speech result.

Twilio Studio FAQ Split Based On... Widget 3

How can I cancel an active Execution?

  1. Navigate to the Logs page within Studio — located to the left of the canvas within the Flow management menu.
  2. Select Show Active Executions Only and find the Execution to be canceled using the Contact and Date Created information.
  3. Select Stop Execution.

Can I move my Flow to another project?

You can import and export a Flow. Learn how to export an existing Flow by copying the JSON representation. Learn how to import a Flow by pasting the JSON representation of the Flow that you are moving when creating a new project.

How can I test my Flow?

Flows can be modified after being published but will not be live to users who are not defined as a test user. Modified Flows are considered to be in a draft state until the Publish button is pressed again.

Test users can be managed within the Flow Configuration, which is found when clicking on the Trigger Widget. Any valid phone number added to the TEST USERS field will use the latest draft revision when they start an Execution rather than the latest published revision.

Why is my message not being sent? Why is my call not being made?

Use logs provided by Studio to manage and troubleshoot all Flow Executions. The Execution may have failed and ended before a specific Widget was reached, resulting in a message or call not being delivered. The delivery of the message or call itself may have also failed — you can find the details inside the Step information within the Execution log.

To access logs, select the Logs option in the Flow management menu — located to the left of the Studio Canvas. Find the Execution that failed based on the Contact and Date Created and select it. Each Step that was run during the Execution will be visible in the log.

Twilio Studio FAQ Logs

For example, the log above shows a Send Message failure that resulted in the Execution ending for the user. Details of the failure are shown within the debugging information — found by selecting the right-arrow for a specific Step.

How do I pass variables from my Flow to a Twilio Runtime Function?

The Run Function Widget has optional configuration called Function Parameters, located at the bottom of the configuration menu for the Widget. You can add variables to be passed to the Function by selecting the + button, setting the key value which will be used to identify the variable when the Function executes, and setting the value of the variable.

Twilio Studio FAQ Variables To Function

When the Function executes, these variables will be available in the event parameter. In this example, you would use event.myVariableName within the Function body to access the value 1.

How do I store input from a user when my Flow is executing?

Use the Set Variables Widget to create a variable that will hold the value inputted by the user, for example, if a user is prompted to enter a value from 1 to 10 when they text the Twilio phone number associated with the Studio Flow. When a reply is received, the Set Variables Widget will store this input into a variable called rating which can be then accessed using {{flow.variables.rating}} . Here, rating serves as a placeholder for the variable name that was specified.

Twilio Studio FAQ Store Input

Twilio Studio FAQ Store Input 2

Notice that to get user input, the Set Variables Widget had to access the inbound message body of the Send & Wait For Reply Widget.

Input is stored by default inside of the Widget that requested it. You can access this from the Liquid Template Language variable that is associated with the input value — {{widgets.<MY_WIDGET_NAME>.inbound.Body}} being the variable for the Send & Wait for Reply Widget.

How can I access my database in a Flow?

One way of accessing your database is by using Twilio Runtime Functions. Use the Run Function Widget to call a Function hosted by Twilio that you have created. Inside the Function, you will contact the database server you are using with the appropriate Node.js library. See how to pass variables from Studio to your Runtime Function.

Learn how to connect your Twilio Function to a local database.

How can I assign my Studio Flow to a Twilio phone number if my Flow is not showing up in the dropdown?

Assign the Studio Flow by setting the handler to be a Webhook and pasting the webhook of the Studio Flow in the field.

  1. In your Studio Flow, click on the Trigger (Start) Widget and find the Webhook URL field. Copy the URL.
  2. Navigate to Phone Numbers > Manage > Active numbers in the navigation panel of the Twilio console. Find the number you would like to attach the Studio Flow to and click into it.
  3. Scroll down to Voice & Fax. Under A Call Comes In, specify that a Webhook should handle the call. Paste the URL you copied from your Flow into the field to the right.
  4. Click Save. Your Studio Flow is now connected to the Twilio phone number.

Twilio Studio Configure Twilio Flow Webhook for Call Manually

What is the Run Function Widget?

The Run Function Widget allows a Flow to access code that is hosted by Twilio Runtime Functions — another product offered by Twilio. You are able to write code that will be hosted by Twilio using the Functions product. The Run Function Widget takes in the URL where the code is being hosted and runs it during a Flow’s Execution.

This allows a Flow to interact with the code that you write. More complex tasks like random number generation and making requests to a database can be accomplished using this method.

What is the Make HTTP Request Widget?

The Make HTTP Request Widget allows a Flow to make a web request to a service located at a given URL. The service may be a deployed REST API (think of this as a processing center that will return or update information depending on the processes that are called — specified by a URL). On a Flow Execution, the Make HTTP Request Widget will use the Request URL provided along with the Request Method to query the service, which will then return a status that Studio will use to determine if the request succeeded or failed.

This allows a Flow to interact with APIs and other services located at a given URL.

What is the Add TwiML Redirect Widget?

TwiML is a document of data that stores actions and information. Tags are used within this document to wrap information and tell the process reading the document how the information should be handled. The TwiML Redirect Widget allows a Flow to communicate with a TwiML document that is hosted at a specified URL.

Use the TwiML Redirect Widget when a TwiML document outside of Studio needs to be accessed while a Flow executes.

How can I make an outbound request in my Flow?

There are two widgets available to make an outbound webhook request:

  1. Run Function Widget - Invoke a Twilio Runtime Function. Learn more about Twilio Runtime Functions.
  2. Make HTTP Request Widget - Make a request to an external service.

Why does every incoming message create a new execution?

If a number is configured with a Messaging Service, you need to use the Messaging Service SID as the From identifier so that users can reply to your messages.

Studio keeps track of executions by their unique to/from address pair and uses this to look for active executions with which to associate incoming messages. When a Messaging Service calls the webhook for Studio, it provides that Service SID as the From identifier instead of the number itself.

For example, if you trigger a new flow from +15017122661 (which is associated with MG9752274e9e519418a7406176694466fa) to +15558675310, then Studio will supply +15017122661 as the From value when interacting with the Programmable Message API. Internally, Studio keeps track of this execution as a conversation between +15017122661 and +15558675310. When the Messaging Service then calls the Studio webhook, it supplies MG9752274e9e519418a7406176694466fa as the To value (reversed as this is an inbound message). Studio can’t find an existing execution between MG9752274e9e519418a7406176694466fa and +15558675310 and so a new execution is created.

What is the "Studio API Key" in my list of API Keys?

Studio creates an API Key to use when your workflows make requests to the Twilio API. Learn more about this process.

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