Skip to main content

List Channels

Retrieves a list of channels from Slack.

Common Properties​

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs​

  • Client Id - The unique identifier for the Slack client connection obtained from the Connect node.

Output​

  • Channels List - A list of channels in the Slack workspace, including details such as channel ID, name, archived status, private status, and member count.

How It Works​

The List Channels node retrieves all channels from the connected Slack workspace. When executed, the node:

  1. Retrieves the Client Id from the input
  2. Validates the Client Id by checking if a connection exists
  3. Calls the Slack API to get a list of conversations (channels)
  4. Processes the channel information into a structured format
  5. Returns the list of channels as output

Each channel in the list contains the following information:

  • ID - The unique identifier of the channel
  • Name - The name of the channel
  • IsArchived - Whether the channel is archived
  • IsPrivate - Whether the channel is private
  • MemberCount - The number of members in the channel

Requirements​

  • A valid Slack client connection (Client Id from the Connect node)
  • Appropriate permissions to view channels in the Slack workspace

Error Handling​

The node will return specific errors in the following cases:

  • Invalid Client Id that doesn't correspond to an existing connection
  • Slack API errors when fetching the channel list

Usage Notes​

  • The node returns all channels that the bot has access to
  • Private channels will only be included if the bot is a member
  • Archived channels are included in the results with the IsArchived flag set to true
  • The member count includes all users and bots in the channel
  • The output can be used with other nodes that require channel information