arazzo: 1.0.1
info:
title: Slack Rename a Channel and Announce the Change
summary: Rename a channel and post a message announcing the new name.
description: >-
A housekeeping pattern that renames a channel and keeps members informed.
The workflow renames the channel to a new name, captures the updated channel
record, and posts a message announcing the change so members are not caught
off guard. 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: chatApi
url: ../openapi/slack-chat-api-openapi.yml
type: openapi
- name: conversationsApi
url: ../openapi/slack-conversations-api-openapi.yml
type: openapi
workflows:
- workflowId: rename-channel-announce
summary: Rename a channel and announce the new name.
description: >-
Renames a channel to a new name and posts an announcement message into it.
inputs:
type: object
required:
- channel
- name
- announcement
properties:
channel:
type: string
description: The ID of the conversation to rename.
name:
type: string
description: The new name for the conversation.
announcement:
type: string
description: The message announcing the rename.
steps:
- stepId: renameChannel
description: >-
Rename the channel to the supplied new name and capture the updated
channel record.
operationId: $sourceDescriptions.conversationsApi.postConversationsRename
requestBody:
contentType: application/x-www-form-urlencoded
payload:
channel: $inputs.channel
name: $inputs.name
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/ok == true
outputs:
channelId: $response.body#/channel/id
channelName: $response.body#/channel/name
- stepId: announceRename
description: >-
Post an announcement message into the renamed channel so members know the
name changed.
operationId: $sourceDescriptions.chatApi.postChatPostmessage
requestBody:
contentType: application/x-www-form-urlencoded
payload:
channel: $steps.renameChannel.outputs.channelId
text: $inputs.announcement
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/ok == true
outputs:
messageTs: $response.body#/ts
outputs:
channelId: $steps.renameChannel.outputs.channelId
channelName: $steps.renameChannel.outputs.channelName
messageTs: $steps.announceRename.outputs.messageTs
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.