Cross-Provider Workflow

Incident Notify Across Twilio, Slack, and SendGrid

Version 1.0.0

Page on-call by SMS, alert a Slack channel, and email a status update.

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

Providers Orchestrated

twilio slack sendgrid

Workflows

incident-fan-out
Page on-call by SMS, alert Slack, then email stakeholders.
Pages the on-call engineer by SMS through Twilio, alerts the incident channel in Slack, and emails a status update to stakeholders via SendGrid.
3 steps inputs: fromNumber, incidentChannel, incidentSummary, onCallNumber, slackToken, stakeholderEmail outputs: emailStatus, pageSid, slackTs
1
page-on-call
$sourceDescriptions.twilioMessagingApi.createMessage
Page the on-call engineer by SMS through Twilio.
2
alert-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Alert the incident channel in Slack.
3
email-stakeholders
$sourceDescriptions.sendgridMailApi.SendMail
Email a status update to stakeholders via SendGrid.

Source API Descriptions

Arazzo Workflow Specification

msg-incident-notify-twilio-slack-sendgrid.yml Raw ↑
arazzo: 1.0.1
info:
  title: Incident Notify Across Twilio, Slack, and SendGrid
  summary: Page on-call by SMS, alert a Slack channel, and email a status update.
  description: >-
    A cross-provider incident-response workflow that pages the on-call engineer
    by SMS through Twilio's Messaging API, alerts the incident channel through
    the Slack Chat API, and emails a status update to stakeholders through
    SendGrid's Mail Send API. Demonstrates a three-channel incident fan-out in a
    single Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: twilioMessagingApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-messaging-openapi.yml
    type: openapi
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-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: incident-fan-out
    summary: Page on-call by SMS, alert Slack, then email stakeholders.
    description: >-
      Pages the on-call engineer by SMS through Twilio, alerts the incident
      channel in Slack, and emails a status update to stakeholders via SendGrid.
    inputs:
      type: object
      properties:
        fromNumber:
          type: string
        onCallNumber:
          type: string
        incidentSummary:
          type: string
        slackToken:
          type: string
        incidentChannel:
          type: string
        stakeholderEmail:
          type: string
    steps:
      - stepId: page-on-call
        description: Page the on-call engineer by SMS through Twilio.
        operationId: $sourceDescriptions.twilioMessagingApi.createMessage
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            From: $inputs.fromNumber
            To: $inputs.onCallNumber
            Body: Incident declared - $inputs.incidentSummary
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          pageSid: $response.body#/sid
      - stepId: alert-slack
        description: Alert the incident channel in Slack.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        parameters:
          - name: token
            in: header
            value: $inputs.slackToken
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $inputs.incidentChannel
            text: Incident declared - $inputs.incidentSummary
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          slackTs: $response.body#/ts
      - stepId: email-stakeholders
        description: Email a status update to stakeholders via SendGrid.
        operationId: $sourceDescriptions.sendgridMailApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.stakeholderEmail
                subject: Incident status update
            from:
              email: [email protected]
            content:
              - type: text/plain
                value: $inputs.incidentSummary
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
    outputs:
      pageSid: $steps.page-on-call.outputs.pageSid
      slackTs: $steps.alert-slack.outputs.slackTs
      emailStatus: $steps.email-stakeholders.outputs.emailStatus