Cross-Provider Workflow

GitHub Team Create and Member Add with Slack Notify

Version 1.0.0

Create a GitHub team, add a member, then announce it in Slack.

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

Providers Orchestrated

github slack

Workflows

create-team-add-member
Create a GitHub team, add a member, and notify Slack.
Creates a team in a GitHub organization, adds a developer to the team, and posts a Slack message naming the new team.
3 steps inputs: org, slackChannel, teamDescription, teamName, username outputs: membershipState, messageTs, teamSlug
1
create-team
$sourceDescriptions.githubApi.createTeam
Create the new team in the GitHub organization.
2
add-member
$sourceDescriptions.githubApi.addOrUpdateTeamMembershipForUser
Add the developer to the new team.
3
notify-slack
$sourceDescriptions.slackApi.postChatPostmessage
Announce the new team in Slack.

Source API Descriptions

Arazzo Workflow Specification

id-github-team-create-add-member-slack.yml Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Team Create and Member Add with Slack Notify
  summary: Create a GitHub team, add a member, then announce it in Slack.
  description: >-
    A developer onboarding workflow that creates a new team within a GitHub
    organization, adds a developer as a team member, and posts a Slack message
    announcing the team. Chains the created team slug into the membership call so
    a new squad is stood up and staffed in one orchestration.
  version: 1.0.0
sourceDescriptions:
  - name: githubApi
    url: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-teams-openapi.yml
    type: openapi
  - name: slackApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: create-team-add-member
    summary: Create a GitHub team, add a member, and notify Slack.
    description: >-
      Creates a team in a GitHub organization, adds a developer to the team, and
      posts a Slack message naming the new team.
    inputs:
      type: object
      properties:
        org:
          type: string
        teamName:
          type: string
        teamDescription:
          type: string
        username:
          type: string
        slackChannel:
          type: string
    steps:
      - stepId: create-team
        description: Create the new team in the GitHub organization.
        operationId: $sourceDescriptions.githubApi.createTeam
        parameters:
          - name: org
            in: path
            value: $inputs.org
        requestBody:
          contentType: application/json
          payload:
            name: $inputs.teamName
            description: $inputs.teamDescription
            privacy: closed
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          teamSlug: $response.body#/slug
          teamId: $response.body#/id
      - stepId: add-member
        description: Add the developer to the new team.
        operationId: $sourceDescriptions.githubApi.addOrUpdateTeamMembershipForUser
        parameters:
          - name: org
            in: path
            value: $inputs.org
          - name: team-slug
            in: path
            value: $steps.create-team.outputs.teamSlug
          - name: username
            in: path
            value: $inputs.username
        requestBody:
          contentType: application/json
          payload:
            role: member
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          membershipState: $response.body#/state
      - stepId: notify-slack
        description: Announce the new team in Slack.
        operationId: $sourceDescriptions.slackApi.postChatPostmessage
        requestBody:
          contentType: application/json
          payload:
            channel: $inputs.slackChannel
            text: Created GitHub team $inputs.teamName and added $inputs.username.
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
    outputs:
      teamSlug: $steps.create-team.outputs.teamSlug
      membershipState: $steps.add-member.outputs.membershipState
      messageTs: $steps.notify-slack.outputs.messageTs