Cross-Provider Workflow

WhatsApp OTP to SendGrid Confirmation

Version 1.0.0

Send a one-time passcode over WhatsApp, then email a confirmation receipt.

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

Providers Orchestrated

whatsapp sendgrid

Workflows

whatsapp-otp-and-email-confirm
Send an OTP over WhatsApp, then email a delivery confirmation.
Sends a one-time passcode message to a user over WhatsApp and, on a successful send, emails a delivery confirmation to the user via SendGrid.
2 steps inputs: passcode, phoneNumberId, userEmail, userNumber outputs: emailStatus, otpMessageId
1
send-otp-whatsapp
$sourceDescriptions.whatsappCloudApi.sendMessage
Send the one-time passcode to the user over WhatsApp.
2
email-confirmation
$sourceDescriptions.sendgridMailApi.SendMail
Email a delivery confirmation to the user via SendGrid.

Source API Descriptions

Arazzo Workflow Specification

msg-whatsapp-otp-to-sendgrid-confirmation.yml Raw ↑
arazzo: 1.0.1
info:
  title: WhatsApp OTP to SendGrid Confirmation
  summary: Send a one-time passcode over WhatsApp, then email a confirmation receipt.
  description: >-
    A cross-provider verification workflow that delivers a one-time passcode to a
    user over the WhatsApp Cloud API and then emails a confirmation receipt of
    the passcode delivery through SendGrid's Mail Send API. Demonstrates a
    multi-channel OTP delivery pattern combining WhatsApp and email in a single
    Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: whatsappCloudApi
    url: https://raw.githubusercontent.com/api-evangelist/whatsapp/refs/heads/main/openapi/whatsapp-cloud-api-openapi.yml
    type: openapi
  - name: sendgridMailApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/tsg_mail_v3.yaml
    type: openapi
workflows:
  - workflowId: whatsapp-otp-and-email-confirm
    summary: Send an OTP over WhatsApp, then email a delivery confirmation.
    description: >-
      Sends a one-time passcode message to a user over WhatsApp and, on a
      successful send, emails a delivery confirmation to the user via SendGrid.
    inputs:
      type: object
      properties:
        phoneNumberId:
          type: string
        userNumber:
          type: string
        passcode:
          type: string
        userEmail:
          type: string
    steps:
      - stepId: send-otp-whatsapp
        description: Send the one-time passcode to the user over WhatsApp.
        operationId: $sourceDescriptions.whatsappCloudApi.sendMessage
        parameters:
          - name: phone-number-id
            in: path
            value: $inputs.phoneNumberId
        requestBody:
          contentType: application/json
          payload:
            messaging_product: whatsapp
            to: $inputs.userNumber
            type: text
            text:
              body: Your verification code is $inputs.passcode
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          otpMessageId: $response.body#/messages/0/id
      - stepId: email-confirmation
        description: Email a delivery confirmation to the user via SendGrid.
        operationId: $sourceDescriptions.sendgridMailApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.userEmail
                subject: Verification code sent
            from:
              email: [email protected]
            content:
              - type: text/plain
                value: A verification code was just sent to your WhatsApp number.
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
    outputs:
      otpMessageId: $steps.send-otp-whatsapp.outputs.otpMessageId
      emailStatus: $steps.email-confirmation.outputs.emailStatus