arazzo: 1.0.1 info: title: Sendbird Create a Channel and Broadcast a Message summary: Create a group channel with a member set and immediately broadcast a message. description: >- Spins up a group channel for a supplied list of users and broadcasts a single message into it from a sender. Useful for announcement channels, cohort rooms, and any flow where a channel exists only to deliver one message to a known audience. 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: sendbirdApi url: ../openapi/sendbird-platform-openapi.yml type: openapi workflows: - workflowId: create-channel-and-broadcast summary: Create a group channel for a member set and post a message. description: >- Creates a group channel containing the supplied user IDs and then sends a text message into it from the designated sender. inputs: type: object required: - apiToken - userIds - senderId - message properties: apiToken: type: string description: Sendbird Api-Token from the dashboard. userIds: type: array description: User IDs to add to the channel. items: type: string channelName: type: string description: Name for the group channel. default: Broadcast senderId: type: string description: User ID that authors the broadcast message. message: type: string description: Text content of the broadcast message. steps: - stepId: createChannel description: Create a group channel containing the supplied user IDs. operationId: createGroupChannel parameters: - name: Api-Token in: header value: $inputs.apiToken requestBody: contentType: application/json payload: name: $inputs.channelName user_ids: $inputs.userIds successCriteria: - condition: $statusCode == 200 outputs: channelUrl: $response.body#/channel_url memberCount: $response.body#/member_count - stepId: broadcast description: Send the broadcast text message into the new channel. operationId: sendMessage parameters: - name: Api-Token in: header value: $inputs.apiToken - name: channel_url in: path value: $steps.createChannel.outputs.channelUrl requestBody: contentType: application/json payload: message_type: MESG user_id: $inputs.senderId message: $inputs.message successCriteria: - condition: $statusCode == 200 outputs: messageId: $response.body#/message_id createdAt: $response.body#/created_at outputs: channelUrl: $steps.createChannel.outputs.channelUrl messageId: $steps.broadcast.outputs.messageId