Using the For each channel in a workspace iterator
- Última actualización2026/04/21
Use the For each channel in a workspace iterator to automatically iterate through every channel within a specified Slack workspace. It enables you to send messages, gather information, or manage settings across all channels without having to manually select each one.
Procedure
- Double-click or drag the Loop action from the Loop package in the Actions palette.
- From the iterator list, search for theSlack package and select the For each channel in a workspace option.
- Use the Session name field to select one of the following
options:
- Session name: Enter the name of the session you used in the
Connect
action.
(Optional) Click the Insert a value icon to select an existing variable that you have used to store the Slack session name.
- Variable: Enter the name of the variable that you have used to store the session name.
- Session name: Enter the name of the session you used in the
Connect
action.
- Workspace: Select one of the following options to
identify the workspace:
- Workspace name: Specify the workspace name.
- Workspace ID: Specify the workspace ID.
- Channel type: Select one of the following channel
types:
- Public: Includes public channels in the loop
- Private: Includes private channels in the loop
- Both: Includes both public and private channels.
- Assign channel details to a variable: Choose either
Multiple variables or Dictionary
variable to save the channel details in the output variable:
- Multiple variables: Assigns each retrieved value of a specific key
(for example, ID, channelName, isPrivate, isPublic, isArchived,
createdTime, createdBy, topic, purpose, memberCount, webURL) to a
separate variable enabling you to map each channel detail to a specific
variable. Do following steps for each variable:
- Click Add variable mapping.
- Enter the Key of the variable.
- In the Map to variable field, choose a variable where the data will be saved.
- Click Add for this data to be saved to the configured variable.
Table 1. Keys with variable mapping Key Description Variable type ID Unique identifier assigned to the Slack channel. String channelName Displays name of the visible channel. String isPrivate Indicates whether the channel is private (invite-only). Boolean isPublic Indicates whether the channel is public and visible to all members. Boolean isArchived Indicates whether the channel is archived and read-only. Boolean createdTime Indicates the date and time when the channel was created Datetime format createdBy Displays the user ID of the channel creator String topic Displays a short description or headline of the channel. String purpose Displays a detailed description of the channel’s intended use. String memberCount Indicates the number of members in the channel. Number webURL Provides a direct URL to open the channel in Slack String - Dictionary: stores all values in a dictionary object with key-value pairs.
- Multiple variables: Assigns each retrieved value of a specific key
(for example, ID, channelName, isPrivate, isPublic, isArchived,
createdTime, createdBy, topic, purpose, memberCount, webURL) to a
separate variable enabling you to map each channel detail to a specific
variable. Do following steps for each variable: