Cross-Provider Workflow

Teams Channel Message to SendGrid Broadcast

Version 1.0.0

Post to a Microsoft Teams channel, then broadcast it by email via SendGrid.

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

Providers Orchestrated

microsoft-teams sendgrid

Workflows

teams-post-and-email-broadcast
Post a Teams channel message, then broadcast it by email through SendGrid.
Sends a message to a Microsoft Teams channel and, on success, broadcasts the same announcement to a distribution address by email through SendGrid.
2 steps inputs: announcementHtml, announcementText, broadcastEmail, channelId, teamId outputs: emailStatus, teamsMessageId
1
post-teams-message
$sourceDescriptions.teamsGraphApi.sendChannelMessage
Post the announcement to the Microsoft Teams channel.
2
email-broadcast
$sourceDescriptions.sendgridMailApi.SendMail
Broadcast the same announcement by email via SendGrid.

Source API Descriptions

Arazzo Workflow Specification

msg-teams-channel-to-sendgrid-broadcast.yml Raw ↑
arazzo: 1.0.1
info:
  title: Teams Channel Message to SendGrid Broadcast
  summary: Post to a Microsoft Teams channel, then broadcast it by email via SendGrid.
  description: >-
    A cross-provider workflow that posts an announcement to a Microsoft Teams
    channel through the Teams Graph API and then broadcasts the same
    announcement to a wider audience by email using SendGrid's Mail Send API.
    Demonstrates pairing an internal collaboration channel with an email
    broadcast in a single Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: teamsGraphApi
    url: https://raw.githubusercontent.com/api-evangelist/microsoft-teams/refs/heads/main/openapi/microsoft-teams-graph-api.yaml
    type: openapi
  - name: sendgridMailApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/tsg_mail_v3.yaml
    type: openapi
workflows:
  - workflowId: teams-post-and-email-broadcast
    summary: Post a Teams channel message, then broadcast it by email through SendGrid.
    description: >-
      Sends a message to a Microsoft Teams channel and, on success, broadcasts
      the same announcement to a distribution address by email through SendGrid.
    inputs:
      type: object
      properties:
        teamId:
          type: string
        channelId:
          type: string
        announcementHtml:
          type: string
        announcementText:
          type: string
        broadcastEmail:
          type: string
    steps:
      - stepId: post-teams-message
        description: Post the announcement to the Microsoft Teams channel.
        operationId: $sourceDescriptions.teamsGraphApi.sendChannelMessage
        parameters:
          - name: team-id
            in: path
            value: $inputs.teamId
          - name: channel-id
            in: path
            value: $inputs.channelId
        requestBody:
          contentType: application/json
          payload:
            body:
              contentType: html
              content: $inputs.announcementHtml
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          teamsMessageId: $response.body#/id
      - stepId: email-broadcast
        description: Broadcast the same announcement by email via SendGrid.
        operationId: $sourceDescriptions.sendgridMailApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.broadcastEmail
                subject: Team announcement
            from:
              email: [email protected]
            content:
              - type: text/plain
                value: $inputs.announcementText
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
    outputs:
      teamsMessageId: $steps.post-teams-message.outputs.teamsMessageId
      emailStatus: $steps.email-broadcast.outputs.emailStatus