Cross-Provider Workflow

Teams Create Channel and Message

Version 1.0.0

Create a Microsoft Teams channel, then post the first message into it.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

microsoft-teams

Workflows

create-channel-and-message
Create a Teams channel, then post the first message into it.
Creates a new channel in a Microsoft Teams team and, on success, posts the first message into the newly created channel.
2 steps inputs: channelDescription, channelName, firstMessageHtml, teamId outputs: channelId, messageId
1
create-channel
$sourceDescriptions.teamsGraphApi.createChannel
Create the new channel within the Teams team.
2
post-first-message
$sourceDescriptions.teamsGraphApi.sendChannelMessage
Post the first message into the newly created channel.

Source API Descriptions

Arazzo Workflow Specification

msg-teams-create-channel-and-message.yml Raw ↑
arazzo: 1.0.1
info:
  title: Teams Create Channel and Message
  summary: Create a Microsoft Teams channel, then post the first message into it.
  description: >-
    A workflow that provisions a new channel within a Microsoft Teams team
    through the Teams Graph API and then posts the first message into the newly
    created channel through the same API. Demonstrates chaining a channel
    provisioning step to a messaging step within Microsoft Teams 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
workflows:
  - workflowId: create-channel-and-message
    summary: Create a Teams channel, then post the first message into it.
    description: >-
      Creates a new channel in a Microsoft Teams team and, on success, posts the
      first message into the newly created channel.
    inputs:
      type: object
      properties:
        teamId:
          type: string
        channelName:
          type: string
        channelDescription:
          type: string
        firstMessageHtml:
          type: string
    steps:
      - stepId: create-channel
        description: Create the new channel within the Teams team.
        operationId: $sourceDescriptions.teamsGraphApi.createChannel
        parameters:
          - name: team-id
            in: path
            value: $inputs.teamId
        requestBody:
          contentType: application/json
          payload:
            displayName: $inputs.channelName
            description: $inputs.channelDescription
            membershipType: standard
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          channelId: $response.body#/id
      - stepId: post-first-message
        description: Post the first message into the newly created channel.
        operationId: $sourceDescriptions.teamsGraphApi.sendChannelMessage
        parameters:
          - name: team-id
            in: path
            value: $inputs.teamId
          - name: channel-id
            in: path
            value: $steps.create-channel.outputs.channelId
        requestBody:
          contentType: application/json
          payload:
            body:
              contentType: html
              content: $inputs.firstMessageHtml
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageId: $response.body#/id
    outputs:
      channelId: $steps.create-channel.outputs.channelId
      messageId: $steps.post-first-message.outputs.messageId