Twilio Studio Trigger a Flow Execution and Track Its Steps
Version 1.0.0
Start a Studio Flow execution for a contact, fetch the execution, and list the steps it traversed.
1 workflow1 source API1 provider
View SpecView on GitHubAuthenticationCommunicationsContact CenterEmailIoTMessagingPhoneSMST1VerificationVideoVoiceTwilioTelecommunicationsReal-TimeWhatsAppArazzoWorkflows
arazzo: 1.0.1
info:
title: Twilio Studio Trigger a Flow Execution and Track Its Steps
summary: Start a Studio Flow execution for a contact, fetch the execution, and list the steps it traversed.
description: >-
The core Twilio Studio automation pattern. The workflow triggers a new
execution of an existing Studio Flow for a given contact, fetches the
execution back to confirm it is active or ended, and then lists the
execution steps so the path the contact took through the flow can be
observed. Every step spells out its request inline so the flow can be read
and executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: flowsApi
url: ../openapi/twilio-flows-api-openapi.yml
type: openapi
workflows:
- workflowId: trigger-execution-track-steps
summary: Trigger a Studio Flow execution and inspect the steps taken.
description: >-
Creates a flow execution for a contact, fetches the execution status, and
lists the execution steps.
inputs:
type: object
required:
- flowSid
- to
- from
properties:
flowSid:
type: string
description: The Studio Flow SID (starts with FW).
to:
type: string
description: The contact phone number to send the execution to (E.164).
from:
type: string
description: The Twilio number or sender associated with the flow.
parameters:
type: string
description: Optional JSON string of flow parameters.
steps:
- stepId: triggerExecution
description: >-
Start a new execution of the Studio Flow for the contact.
operationId: CreateExecution
parameters:
- name: FlowSid
in: path
value: $inputs.flowSid
requestBody:
contentType: application/x-www-form-urlencoded
payload:
To: $inputs.to
From: $inputs.from
Parameters: $inputs.parameters
successCriteria:
- condition: $statusCode == 200
outputs:
executionSid: $response.body#/sid
status: $response.body#/status
- stepId: fetchExecution
description: >-
Fetch the execution by SID to read its current status.
operationId: FetchExecution
parameters:
- name: FlowSid
in: path
value: $inputs.flowSid
- name: Sid
in: path
value: $steps.triggerExecution.outputs.executionSid
successCriteria:
- condition: $statusCode == 200
outputs:
status: $response.body#/status
- stepId: listSteps
description: >-
List the steps the execution traversed through the flow.
operationId: ListExecutionStep
parameters:
- name: FlowSid
in: path
value: $inputs.flowSid
- name: ExecutionSid
in: path
value: $steps.triggerExecution.outputs.executionSid
successCriteria:
- condition: $statusCode == 200
outputs:
steps: $response.body#/steps
outputs:
executionSid: $steps.triggerExecution.outputs.executionSid
status: $steps.fetchExecution.outputs.status
steps: $steps.listSteps.outputs.steps
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.