Cross-Provider Workflow

Twilio Verify OTP with Slack Notify

Version 1.0.0

Start a Twilio verification, check the code, then notify a Slack channel.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

twilio slack

Workflows

verify-otp-and-notify
Start a verification, check the code, then notify Slack of the result.
Starts a Twilio Verify verification over SMS, checks the user-provided code, and posts the approval result to a Slack channel.
3 steps inputs: code, notifyChannel, serviceSid, slackToken, toNumber outputs: checkStatus, notifyTs, verificationSid
1
start-verification
$sourceDescriptions.twilioVerifyApi.createVerification
Start a verification and send the OTP over SMS.
2
check-code
$sourceDescriptions.twilioVerifyApi.createVerificationCheck
Check the user-supplied code against the verification.
3
notify-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Post the verification result to a Slack channel.

Source API Descriptions

Arazzo Workflow Specification

msg-twilio-verify-otp-with-slack-notify.yml Raw ↑
arazzo: 1.0.1
info:
  title: Twilio Verify OTP with Slack Notify
  summary: Start a Twilio verification, check the code, then notify a Slack channel.
  description: >-
    A cross-provider workflow that starts a one-time-passcode verification with
    Twilio Verify, checks a user-supplied code, and posts the verification
    outcome to a Slack channel through the Slack Chat API. Demonstrates a
    multi-step OTP verification flow with an internal notification in a single
    Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: twilioVerifyApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-verify-openapi.yml
    type: openapi
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: verify-otp-and-notify
    summary: Start a verification, check the code, then notify Slack of the result.
    description: >-
      Starts a Twilio Verify verification over SMS, checks the user-provided
      code, and posts the approval result to a Slack channel.
    inputs:
      type: object
      properties:
        serviceSid:
          type: string
        toNumber:
          type: string
        code:
          type: string
        slackToken:
          type: string
        notifyChannel:
          type: string
    steps:
      - stepId: start-verification
        description: Start a verification and send the OTP over SMS.
        operationId: $sourceDescriptions.twilioVerifyApi.createVerification
        parameters:
          - name: ServiceSid
            in: path
            value: $inputs.serviceSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toNumber
            Channel: sms
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          verificationSid: $response.body#/sid
          verificationStatus: $response.body#/status
      - stepId: check-code
        description: Check the user-supplied code against the verification.
        operationId: $sourceDescriptions.twilioVerifyApi.createVerificationCheck
        parameters:
          - name: ServiceSid
            in: path
            value: $inputs.serviceSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toNumber
            Code: $inputs.code
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/status == "approved"
        outputs:
          checkStatus: $response.body#/status
      - stepId: notify-slack
        description: Post the verification result to a Slack channel.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        parameters:
          - name: token
            in: header
            value: $inputs.slackToken
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $inputs.notifyChannel
            text: Verification for $inputs.toNumber result $steps.check-code.outputs.checkStatus
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          notifyTs: $response.body#/ts
    outputs:
      verificationSid: $steps.start-verification.outputs.verificationSid
      checkStatus: $steps.check-code.outputs.checkStatus
      notifyTs: $steps.notify-slack.outputs.notifyTs