Cross-Provider Workflow

Announcement Cross-Post to Slack and Teams

Version 1.0.0

Cross-post a single announcement to both Slack and Microsoft Teams.

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

Providers Orchestrated

slack microsoft-teams

Workflows

cross-post-announcement
Post one announcement to a Slack channel and a Teams channel.
Posts an announcement to a Slack channel and, on success, posts the same announcement to a Microsoft Teams channel.
2 steps inputs: announcementHtml, announcementText, slackChannel, slackToken, teamId, teamsChannelId outputs: slackTs, teamsMessageId
1
post-to-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Post the announcement to the Slack channel.
2
post-to-teams
$sourceDescriptions.teamsGraphApi.sendChannelMessage
Post the same announcement to the Microsoft Teams channel.

Source API Descriptions

Arazzo Workflow Specification

msg-announcement-cross-post-slack-and-teams.yml Raw ↑
arazzo: 1.0.1
info:
  title: Announcement Cross-Post to Slack and Teams
  summary: Cross-post a single announcement to both Slack and Microsoft Teams.
  description: >-
    A cross-provider workflow that publishes a single company announcement to a
    Slack channel through the Slack Chat API and to a Microsoft Teams channel
    through the Teams Graph API. Demonstrates fanning one announcement out across
    two team collaboration platforms in a single Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
  - name: teamsGraphApi
    url: https://raw.githubusercontent.com/api-evangelist/microsoft-teams/refs/heads/main/openapi/microsoft-teams-graph-api.yaml
    type: openapi
workflows:
  - workflowId: cross-post-announcement
    summary: Post one announcement to a Slack channel and a Teams channel.
    description: >-
      Posts an announcement to a Slack channel and, on success, posts the same
      announcement to a Microsoft Teams channel.
    inputs:
      type: object
      properties:
        slackToken:
          type: string
        slackChannel:
          type: string
        announcementText:
          type: string
        announcementHtml:
          type: string
        teamId:
          type: string
        teamsChannelId:
          type: string
    steps:
      - stepId: post-to-slack
        description: Post the announcement to the Slack channel.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        parameters:
          - name: token
            in: header
            value: $inputs.slackToken
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $inputs.slackChannel
            text: $inputs.announcementText
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          slackTs: $response.body#/ts
      - stepId: post-to-teams
        description: Post the same 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.teamsChannelId
        requestBody:
          contentType: application/json
          payload:
            body:
              contentType: html
              content: $inputs.announcementHtml
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          teamsMessageId: $response.body#/id
    outputs:
      slackTs: $steps.post-to-slack.outputs.slackTs
      teamsMessageId: $steps.post-to-teams.outputs.teamsMessageId