Cross-Provider Workflow

Slack Create Channel and Post Kickoff

Version 1.0.0

Create a Slack conversation channel, then post a kickoff message into it.

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

Providers Orchestrated

slack

Workflows

create-channel-and-post
Create a Slack channel, then post a kickoff message into it.
Creates a new Slack conversation channel and, on success, posts a kickoff message into the newly created channel.
2 steps inputs: channelName, kickoffText, slackToken outputs: channelId, kickoffTs
1
create-channel
$sourceDescriptions.slackConversationsApi.postConversationsCreate
Create the new Slack conversation channel.
2
post-kickoff
$sourceDescriptions.slackChatApi.postChatPostmessage
Post a kickoff message into the newly created channel.

Source API Descriptions

Arazzo Workflow Specification

msg-slack-create-channel-and-post.yml Raw ↑
arazzo: 1.0.1
info:
  title: Slack Create Channel and Post Kickoff
  summary: Create a Slack conversation channel, then post a kickoff message into it.
  description: >-
    A workflow that provisions a new Slack conversation channel through the Slack
    Conversations API and then posts a kickoff message into the freshly created
    channel through the Slack Chat API. Demonstrates chaining a channel
    provisioning step to a messaging step within the Slack platform in a single
    Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: slackConversationsApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-conversations-openapi.yml
    type: openapi
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: create-channel-and-post
    summary: Create a Slack channel, then post a kickoff message into it.
    description: >-
      Creates a new Slack conversation channel and, on success, posts a kickoff
      message into the newly created channel.
    inputs:
      type: object
      properties:
        slackToken:
          type: string
        channelName:
          type: string
        kickoffText:
          type: string
    steps:
      - stepId: create-channel
        description: Create the new Slack conversation channel.
        operationId: $sourceDescriptions.slackConversationsApi.postConversationsCreate
        parameters:
          - name: token
            in: header
            value: $inputs.slackToken
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            name: $inputs.channelName
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          channelId: $response.body#/channel/id
      - stepId: post-kickoff
        description: Post a kickoff message into the newly created channel.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        parameters:
          - name: token
            in: header
            value: $inputs.slackToken
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $steps.create-channel.outputs.channelId
            text: $inputs.kickoffText
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          kickoffTs: $response.body#/ts
    outputs:
      channelId: $steps.create-channel.outputs.channelId
      kickoffTs: $steps.post-kickoff.outputs.kickoffTs