Slack · Arazzo Workflow

Slack Create a User Group and Assign Members

Version 1.0.0

Create a user group, assign members, and confirm the membership list.

1 workflow 1 source API 1 provider
View Spec View on GitHub BotsChatCollaborationMessagingProductivityT1Team CommunicationArazzoWorkflows

Provider

slack

Workflows

create-usergroup-assign-members
Create a user group, assign members, and verify the membership.
Creates a user group, assigns the supplied comma separated list of user IDs to it, and reads the membership list back to confirm.
3 steps inputs: description, handle, name, users outputs: members, usergroupId
1
createUsergroup
postUsergroupsCreate
Create the user group with the supplied name, handle, and description.
2
assignMembers
postUsergroupsUsersUpdate
Assign the supplied comma separated list of users to the new user group.
3
verifyMembers
getUsergroupsUsersList
Read the user group's membership list back to confirm the members were assigned.

Source API Descriptions

Arazzo Workflow Specification

slack-create-usergroup-assign-members-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Slack Create a User Group and Assign Members
  summary: Create a user group, assign members, and confirm the membership list.
  description: >-
    A team modelling pattern that stands up a mentionable user group and
    populates it. The workflow creates the user group with a name and handle,
    assigns the supplied members to it, and then reads the membership list back
    to confirm the assignment took effect. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: usergroupsApi
  url: ../openapi/slack-usergroups-openapi.yml
  type: openapi
workflows:
- workflowId: create-usergroup-assign-members
  summary: Create a user group, assign members, and verify the membership.
  description: >-
    Creates a user group, assigns the supplied comma separated list of user IDs
    to it, and reads the membership list back to confirm.
  inputs:
    type: object
    required:
    - name
    - handle
    - users
    properties:
      name:
        type: string
        description: A name for the user group, unique among user groups.
      handle:
        type: string
        description: A mention handle, unique among channels, users, and user groups.
      description:
        type: string
        description: A short description of the user group.
      users:
        type: string
        description: A comma separated list of user IDs to assign to the group.
  steps:
  - stepId: createUsergroup
    description: >-
      Create the user group with the supplied name, handle, and description.
    operationId: postUsergroupsCreate
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        name: $inputs.name
        handle: $inputs.handle
        description: $inputs.description
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.ok == true
      type: jsonpath
    outputs:
      usergroupId: $response.body#/usergroup/id
  - stepId: assignMembers
    description: >-
      Assign the supplied comma separated list of users to the new user group.
    operationId: postUsergroupsUsersUpdate
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        usergroup: $steps.createUsergroup.outputs.usergroupId
        users: $inputs.users
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.ok == true
      type: jsonpath
    outputs:
      assigned: $response.body#/ok
  - stepId: verifyMembers
    description: >-
      Read the user group's membership list back to confirm the members were
      assigned.
    operationId: getUsergroupsUsersList
    parameters:
    - name: usergroup
      in: query
      value: $steps.createUsergroup.outputs.usergroupId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.ok == true
      type: jsonpath
    outputs:
      members: $response.body#/users
  outputs:
    usergroupId: $steps.createUsergroup.outputs.usergroupId
    members: $steps.verifyMembers.outputs.members