Twilio Studioとは?

Twilio Studio is a visual low-code/no-code tool that enables cross-functional teams to design, deploy, and scale customer communications. Companies can now fast-track their customer engagement roadmap using the creative talent of all builders within their organization.

Twilio Studioの使用シーン

Any builder on your team can use Twilio Studio to quickly and easily create and modify flows. Studio is designed for use by cross-functional teams, and it provides a common framework for everyone to do the work they need to do. Designers can make swift UX modifications, copywriters can implement their own changes to messaging, and developers can delegate work to others and focus on building more complex features (such as calling Twilio Functions).


  • SMSの受信、音声通話の着信、およびワークフローからFlowをトリガーする
  • Create, Modify, and Deploy Flows (Workflows)
  • Import and Export Flows
  • Transition (遷移) を追加および削除する
  • インスペクターパネルでWidget設定を管理する
  • Transitionを定義してFlowのユーザーを前進させる
  • 変数を作成し、それを渡す
  • View Executions (Individual runs through flows)
  • 複数のFlowに分離してユースケースおよびロジックを整理する


You can start using Studio by logging in and visiting the Studio homepage in the Twilio console.






Flowは作成された個々のワークフローです。 ひとつ以上のユースケースを処理できます。



WidgetはFlowのキャンバス上にドラッグ可能な個々のアイテムです。 これらはひとつのロジックであり、Transitionによって互いに接続できます。

Send Message Widgetを使用してFlow内のユーザーにSMSを送信できます。



You might have a Transition based on the condition of an incoming message; you could handle specific text inputs and route them to a Split Based On... Widget.


StepはWidgetの実行時の処理であり、Widgetに入ったタイミングで開始されます。 Stepの最後では変数が設定されます。

ユーザーにテキスト入力をプロンプトする際、そのユーザーがSMSを受信すると、Wedgetを退出する(返信を行うかタイムアウトに達する)までそのユーザーはStep内に存在していることになります。 プロンプトが変数の設定を意図している場合、これは最後に行われます。


An Execution represents a specific person’s run through a Flow. An Execution is active while the user is in the Flow, and it is considered ended when they stop or are kicked out of the Flow.

When I call the Twilio number connected to a Flow, an Execution is created to represent my call to that number / path through the Flow. The owner of the Flow can see my Execution, as well as the Executions of other users who have run through the Flow.

Data Retention in Studio

Upcoming Change to Data Retention

Beginning October 1, 2021, Studio will retain Execution and Step data for 30 days after an Execution starts. (Currently we retain this data for 30 days after an Execution ends.) Once the data expires, it will be unavailable via the Studio REST API and Twilio Console.

Active Executions that are still awaiting a response from your end user after 30 days will also be deleted. If your end user responds after their Execution is deleted, they will return to the top of the Flow and start a new Execution.

To access your Execution and Step logs past 30 days, use Event Streams to subscribe to Studio Flow events and log them in your own systems.

Current Data Retention Policy

Currently, Studio retains Execution and Step logs for 30 days after Executions end. However, Executions that have not ended within 60 days of being created are considered stuck. Studio automatically ends and deletes stuck Executions 60 days after they were created. Once Executions are deleted, they are no longer accessible via Console or the API.

Data Retention for Underlying Products

Data relating to underlying products used via Studio, such as SMS or Voice call logs, are not automatically deleted at the same time as Execution data. Data generated by other products is retained in line with those products' data policies. Details of individual product data retention policies can be found in the specific product documentation, such as here for SMS and here for Voice calls.

PCI Compliance in Studio

Studio does not fully support the PCI Mode setting in Programmable Voice, however you can build PCI compliant Flows that process payments with Studio using the Capture Payments widget.

Please note: Studio does not redact <Gather> data collected by the Gather Input widget. To use <Gather> for collecting PCI sensitive data, use the TwiML Redirect widget to redirect the call away from Studio to an external URL that can collect <Gather> data in a compliant way.

Learn more about Twilio's PCI Compliance.

Handling concurrent calls from the same number in Studio

The concurrent calls setting only applies to Executions created via the Incoming Call trigger type. Incoming Message and REST API triggered Executions are not affected.

Note: This functionality changed on October 1st 2018. New flows created after this date will handle concurrent calls from the same caller ID by default. For flows created before that date, the switch must be made manually in the call trigger (see screenshot below).

By default, Studio flows can handle inbound concurrent calls from the same number. The Send and Wait For Reply widget cannot be attached anywhere downstream of the Incoming Call trigger point. This is because if multiple users are calling from the same number, Studio can't uniquely text back one user in an active execution and correctly identify a reply, because callers all share the same number.

For certain specific use cases, where you know callers to a Studio flow will always have a unique visible caller ID, you can disable the concurrent calls mode via the Advanced Features dropdown in the Trigger widget (see below). When disabled, you will be able to add the Send and Wait for Reply widget to incoming call trigger connected flows. This is only recommended for advanced users who know that their flow is triggered from visible unique caller IDs.

Enabling Concurrent Calls in Studio

Note: Concurrent Calls does not apply to Executions triggered by an Incoming Message or the REST API. Those trigger types can only handle one concurrent Execution per Contact to ensure each session is uniquely tracked.




Create a Flow


Navigating the Canvas

キャンバスはFlowを組み立てる場所です。 まずTrigger Widgetから始まり、それからWedgetをドラッグ&ドロップしてユースケースに合致したFlowを構築できます。

Studio Canvas

時には(特に複雑なFlowでは!)キャンバスが散らかってくることがあるため、フォーカスする場所をコントロールできることが重要です。 マウスを使用してキャンバスをドラッグし位置を変更したり、ズームイン/アウトのリンクを使用して縮尺を変更できます。 またトラックパッドを使用している場合はピンチしたり押し込んだりして、ズームを行うこともできます。

Working With Widgets

WidgetはFlowの構成部品です。 これらを使用して着信/受信のアクションを処理して応答したり、メッセージを送信したり、ユーザーをFlowの別の箇所にルーティングしたり、情報を取得したりといったことが行えます。

Flowキャンバスの右側にWidgetライブラリーパネルが見つかり、そこにはすぐにドラッグ&ドロップ可能なWidgetがいくつかあります。 Widgetを選択すると、このパネルはインスペクターパネルに変化します。

これらのWidgetをキャンバスにドラッグし、新規または既存のFlowに接続するだけです。 個々のWidgetをクリックすると、同じ右側のパネルに構成オプションが表示されます。

say/play widget

Keyboard shortcuts are available if you'd like to duplicate widgets on the canvas. Simply select a widget (it will highlight in blue) and then copy (Cmd + C on Mac or Ctrl +C on Windows) and paste (Cmd + V on Mac or Ctrl + V on Windows).

Widgetはインスペクターパネル(Widgetライブラリーと同じ右側のパネル)から構成できます。 Widgetをクリックするだけで、構成オプションを表示できます。Widgetにカスタムの名前をつけることができます。 括弧内にWidgetのタイプが表示されるため、その役割が常に分かるようになっています。Widget名は一意でなければならず、また英文字から開始し、空白文字またはピリオドを含むことはできません。 単語を区切るには、アンダースコア文字を使用します。

Do not use Personally Identifiable Information in Flow names or Widget names

You should not use directly identifying information (aka personally identifiable information or PII) like a person's name, home address, email or phone number, etc., in Flow names or Widget Names because the systems that will process this attribute assume it is not directly identifying information. You can read more about how we process your data in our privacy policy.

Widgetsの一部は構成の設定が必要になります。 これらは赤いアスタリスク (*) 、および下記のWidgetライブラリーリファレンスで明示されています。 必須の構成が不足しているか無効な場合は、Flowを保存することができません。


Transitionはイベントおよび指定された条件に基づいて、どのようにFlowがあるWidgetから次のWidgetへと前進するかを定義します。 キャンバスから、New from a WidgetをタップしてTransitionオプションを呼び出すことができます。


また右側のインスペクターパネルでNew Transitionをクリックすることで、Transitionを設定することもできます。 しばしばTransitionはWidgetの種類に基づいてあらかじめ設定済みの場合があり、通常は通話またはメッセージの状態を反映します。 -- レスポンスが受信されたか? 通話がタイムアウトしたか? メッセージの送信に成功したか、といった具合です。

各Transitionは別のWidgetに接続します。 各トランジションについて接続先を異なるWidgetに設定したり、あるいは(例として、番号の「1」を声に出して話したユーザーを、プッシュボタンで「1」キーを押したユーザーと同じWidgetにマッピングする場合など)、2つ以上のTransitionを同一のWidgetに向かうように設定したりといったように選択できます。

Transitionを削除するには、Transition開始側のWidgetをクリックし、ラインをドラッグします。 またWidgetをクリックし、構成パネルのTransitionsタブを選択、削除したいTransition隣の「...」をクリックし、ドロップダウンメニューから「Disconnect Transition」オプションを選択します。



  • incomingMessage
  • incomingCall
  • REST API (受信リクエスト)

All three of these appear in the Trigger Widget, and you can drag-and-drop from one or more to reflect the needs of your use case.



The Incoming Message trigger is invoked when your Twilio Phone Number (or other message-based channel) receives a new message and sends it to your Studio Flow Webhook URL:


By connecting Send Message or Send & Wait for Reply widgets, you can respond to those incoming messages and carry on a conversation with the Contact.

Studio maintains a unique session based on the Contact's identifier (usually a phone number). For a messaging Flow, Studio only allows a single active Execution per Contact. Thus, all messages from the Contact to that Flow during an active Execution will be handled by that same Execution.


The Incoming Call trigger is invoked when your Twilio Phone Number (or other voice-based channel) receives a new call and sends it to your Studio Flow Webhook URL:


By connecting voice widgets, such as Say/Play and Gather Input, you can guide the Contact through a series of interactive voice responses (IVR) and even connect the Contact to another party with Connect Call To or route them to Record Voicemail.

By default Studio maintains a unique voice session based on the combination of the Contact's identifier (usually a phone number) and the unique Call SID, ensuring every call is handled uniquely, even if concurrent calls use the same Caller ID.

REST API Trigger

Using the Studio REST API, you can trigger an outbound call or message to a Contact. Use this trigger type to initiate appointment reminders, surveys or alerts from your own application. Add widgets to the REST API trigger to control the conversation just as you would for Incoming Message or Incoming Call.

For outbound voice calls, use the Make Outgoing Call widget to initiate the call; for oubound messages, use either Send Message to fire and forget or Send & Wait for Reply to initiate a two-way conversation.

Studio maintains a unique session based on the Contact's identifier (usually a phone number). For a REST API Flow, Studio only allows a single active Execution per Contact. If an Execution is already active for a Contact, a new REST API request for that same Contact will simply return the existing Execution.

Tip: Be sure the To and From phone numbers are formatted as E.164 (e.g. +1xxxxxxxxxx) to ensure correct session tracking.

See the Studio REST API docs for more details.

Subflow Trigger

Note: Subflows are currently in private beta and not generally available.

To invoke a Flow as a Subflow, connect widgets to the Subflow trigger. The Subflow trigger is invoked by the Run Subflow widget.

See Studio Subflows for more details.

Configuring Your Twilio Number for Studio

Flowが満足行く状態に仕上がったら、Twilio電話番号にそれを接続して、人々がやり取りできるようにしましょう! 続いて、Console > 電話番号 > 番号の管理に移動し、Flowに接続したい電話番号を選択します。 続いて(音声用には)通話着信時、(SMS用には)メッセージ受信時のStudio Flowを選択します。 ドロップダウンからFlowを選択し、保存すると接続は完了です。

You can also copy-paste the Webhook URL onto any Twilio resource that takes a callback URL, including Messaging Services, Short Codes, and Channels. Depending on the product, this can be done in the Console, via API, or both.

Note: A Twilio phone number can only route inbound messages and calls to a single Studio Flow (one-to-one), but that Flow can process messages and calls from multiple phone numbers (one-to-many).


Important: For Voice Flows, add the Studio Flow Webhook URL to the Call Status Changes field to ensure Studio can always correctly detect the end of the call. (Studio will attempt to do this for you, if you forget.)

Studio Webhook Call Status Changes

Now, try calling the number in the screenshot -- if you hear a message referencing this guide, it’s powered by a Studio Flow!


Flowが実行されると、Flowコンテキストと呼ばれる場所に状態が保存されます。 Flowコンテキスト内のデータはWidgetから構成フィールドまたはテキストエリアの変数置換を使用し、変数としてアクセスできます。

Studio supports the Liquid template language, which supports both output tags and logic tags. For example, to send a text message and include the contact's name, you could use variables like so:

Hello {{flow.data.first_name}}

さらに洗練されたロジックもサポートされます。 この例では、連絡先名の参照を試みる前に、それを実際に知っているか確認しています:

{% if flow.data.first_name %}

Hello {{flow.data.first_name}}

{% else %}

Hello friend

{% endif %}

Note: Liquid template variables can render up to 16KB strings max.



  • Flow: Flowに属するデータです。 Flowに関連づけられた電話番号などです
  • Trigger: 最初の受信メッセージ、着信通話、あるいはREST APIなど、Flowの初期化時に設定されるデータです。
  • Widgets: 各Widgetが自身に設定するデータ、およびコンテキストが実行されるとそれに追加されるデータです。 ユーザーが押したプッシュボタンの番号や、受信メッセージの本文などです。
  • Contact: 現在Flowとやり取りを行なっている相手の連絡先に関するデータで、電話番号などが該当します


The Flow's Execution Sid: flow.sid

The Flow's address (e.g. Twilio phone number): flow.channel.address

Example Flow variables in JSON format:

    "flow": {
        "flow_sid": "FWxxxx",
        "channel": {
            "address": "+1xxxxxxxxxx"
        "sid": "FNxxxxx"


エンドユーザーのアドレス(たとえば携帯電話番号) contact.channel.address

Widget Variables

After execution, many widgets publish data variables to the Execution context, and these variables may be referenced by subsequent widgets. For example, when the Send Message widget step completes, it will have stored the following variables:

Sid widgets.MY_WIDGET_NAME.message.Sid

To widgets.MY_WIDGET_NAME.message.To

From widgets.MY_WIDGET_NAME.message.From

Body widgets.MY_WIDGET_NAME.message.Body

Note the casing of variable names, and remember that widget names must be unique, must start with a letter and cannot include spaces or additional periods. Any variables that come from an external source, such as a status callback or Twilio API call, are cased according to the relevant spec for that callback. For example, an incoming message will have a "Body" parameter, where we keep the capitalized "Body" like in the Twilio SMS API. Variables specific to the flow, trigger, and widgets context are lower cased.

Flowが受信リクエスト (REST API) 経由でトリガーされるとき、リクエスト時に変数を渡すことができます。

Subscribing to Flow Events with Event Streams

You can use Event Streams to subscribe to Execution and Step events from your Flow. Options for streaming Studio data include both Kinesis and traditional webhooks.

Use these events to log data, generate real-time reports, or trigger other actions:


Try the Event Streams Webhook Quickstart.

Flowの公開と版履歴 (Revision History)

Changes are automatically saved but will not be made live for consumers until you explicitly click "Publish". This lets you safely make changes and when you're happy with the final product, publish them for everyone.

Studio Publishボタン

Studio also includes Revision History. You will be able to see a list of every change made to your flow and the differences between the currently published version and the latest draft.

Testing Draft Flows

Testing draft flows is easy with Studio -- you just need to make your phone number go through the latest draft version instead of the published version. Click the Trigger widget and you can add as many phone numbers as you would like, separated with commas, to experience the latest draft version of the flow.

Studio Test Usersダイアログ

結果に満足したら、Publish (公開) をクリックしてエンドユーザーがアクセスできるようにします。

Renaming Flows

To change the name of your Flow, click on the Trigger widget. The right-side configuration panel includes a field for Flow Name. Enter the desired name, and click Save to rename your Flow.

Renaming Studio Flows

Duplicating Flows

To make a copy of an existing Flow, navigate to your list of Flows and locate the one you'd like to copy. Click on Duplicate Flow and a new copy of the Flow will be created and automatically opened.

Duplicate Flow.png

Deleting Flows

If you'd like to delete a Flow, navigate to your list of Flows and locate the one you'd like to remove. Click on Delete Flow to remove the Flow.

Delete Flow.png

Caution: Deleting a Flow is not recoverable. If you delete a Flow that is being used in production to handle calls or messages, you will need to rebuild the Flow to restore service.

Importing and Exporting Flows

Use this functionality to export flow definitions as JSON and import them to other Twilio accounts. It's best to use Duplicate flow for simply creating a copy of a Flow in the same account. Import / Export of Flows is intended for exporting a flow to store elsewhere, e.g. source control and/or to move flows between Twilio accounts.

Import/Export via the REST API v2

Try the Quickstart

Import and export functionality for Flows is also available via the REST API v2. Check out the Flows API Quickstart to learn how to export the Flow JSON and import it into a new Flow via the REST API and helper libraries.

Your Studio Flow definition may reference other Twilio resources (like phone numbers, Functions, etc.). These references are not automatically copied when the Flow is imported to another account, and you may need to make manual updates to your Flow to refresh references to those resources.

Exporting Flow Data

Click on the Trigger widget and select Show Flow JSON.

Export Flow Trigger

This will display the JSON data that defines your flow. You can copy this data out and store it elsewhere.


Importing Flow Data

Create a new Flow, and select Import from JSON.

New flow from JSON

Click Next. You will be presented with a code window to paste valid Flow JSON.

Paste import JSON

Click Next to create the new Flow once the JSON definition is added.



  • Sometimes Executions become stuck for Inbound Calls. Follow our best practices to avoid stuck Executions.
  • 2010-04-01以降のAPIバージョンのみがサポートされます。 廃止予定の2008年版APIを既定で使用するようアカウントが構成されている場合は、電話番号で新しいAPIを使用するようアップグレードするようにしてください。
  • Infinite loops are possible! We have a built-in limit, so your Execution will end after 1,000 steps. But be careful when creating loops over a set of widgets.
  • Returning custom TwiML from an HTTP Request widget isn't supported. Instead, follow this guide for returning custom TwiML from a Run Function widget or use the Add TwiML Redirect widget.
  • Flows are limited to a maximum of 1,000 widgets for published Flows.


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



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

        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!


        Get link

        Get a free personal referral link here


        Give $10

        Your user signs up and upgrade using link


        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more