Cross-Provider Workflow

GitHub Pull Request Opened to Slack and Microsoft Teams

Version 1.0.0

Open a GitHub pull request, then notify Slack and Microsoft Teams.

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

Providers Orchestrated

github slack microsoft-teams

Workflows

pr-opened-to-slack-teams
Open a GitHub pull request and notify Slack and Microsoft Teams.
Opens a pull request in a GitHub repository, posts a Slack message asking for review, and announces the same pull request in a Microsoft Teams channel.
3 steps inputs: base, channelId, head, owner, prTitle, repo, slackChannel, teamId outputs: messageId, messageTs, prNumber, prUrl
1
open-pr
$sourceDescriptions.githubPulls.createPullRequest
Open a pull request in the GitHub repository.
2
notify-slack
$sourceDescriptions.slackChat.postChatPostmessage
Post a Slack message asking for code review.
3
announce-teams
$sourceDescriptions.microsoftTeams.sendChannelMessage
Announce the pull request in a Microsoft Teams channel.

Source API Descriptions

Arazzo Workflow Specification

dev-github-pr-opened-to-slack-teams.yml Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Pull Request Opened to Slack and Microsoft Teams
  summary: Open a GitHub pull request, then notify Slack and Microsoft Teams.
  description: >-
    A CI collaboration workflow that opens a pull request in a GitHub
    repository, notifies a Slack channel for code review, and posts the same
    announcement to a Microsoft Teams channel so reviewers across both tools are
    aware. Demonstrates chaining a source-control provider, a chat provider, and
    a collaboration provider in a single Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: githubPulls
    url: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-repo-pulls-api-openapi.yml
    type: openapi
  - name: slackChat
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
  - name: microsoftTeams
    url: https://raw.githubusercontent.com/api-evangelist/microsoft-teams/refs/heads/main/openapi/microsoft-teams-graph-api.yaml
    type: openapi
workflows:
  - workflowId: pr-opened-to-slack-teams
    summary: Open a GitHub pull request and notify Slack and Microsoft Teams.
    description: >-
      Opens a pull request in a GitHub repository, posts a Slack message asking
      for review, and announces the same pull request in a Microsoft Teams
      channel.
    inputs:
      type: object
      properties:
        owner:
          type: string
        repo:
          type: string
        prTitle:
          type: string
        head:
          type: string
        base:
          type: string
        slackChannel:
          type: string
        teamId:
          type: string
        channelId:
          type: string
    steps:
      - stepId: open-pr
        description: Open a pull request in the GitHub repository.
        operationId: $sourceDescriptions.githubPulls.createPullRequest
        requestBody:
          contentType: application/json
          payload:
            title: $inputs.prTitle
            head: $inputs.head
            base: $inputs.base
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          prNumber: $response.body#/number
          prUrl: $response.body#/html_url
      - stepId: notify-slack
        description: Post a Slack message asking for code review.
        operationId: $sourceDescriptions.slackChat.postChatPostmessage
        requestBody:
          contentType: application/json
          payload:
            channel: $inputs.slackChannel
            text: $steps.open-pr.outputs.prUrl
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
      - stepId: announce-teams
        description: Announce the pull request in a Microsoft Teams channel.
        operationId: $sourceDescriptions.microsoftTeams.sendChannelMessage
        requestBody:
          contentType: application/json
          payload:
            body:
              contentType: html
              content: $steps.open-pr.outputs.prUrl
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageId: $response.body#/id
    outputs:
      prNumber: $steps.open-pr.outputs.prNumber
      prUrl: $steps.open-pr.outputs.prUrl
      messageTs: $steps.notify-slack.outputs.messageTs
      messageId: $steps.announce-teams.outputs.messageId