Channels
Channels connects your flow to your Slack workspace to manage channels and people: see the list of channels, create a public or private channel, invite a person to a channel and look up a user’s profile.
It is useful to organize your team’s communication automatically, for example to open a channel for every new project and invite the people who will work on it.
When to use it
- Create a channel for every project, customer or major incident.
- Invite a new hire to their department’s channels.
- Get the list of channels so an agent can choose where to post.
- Look up a person’s profile, such as their job title or email, before writing to them.
Configuration
You need a Slack bot API credential with your Slack app’s token, which you get in Slack’s app dashboard. The app must have permissions to manage channels and read users. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | Your app’s Slack bot API credential. |
| Operation (required) | What the component does. See Operations. Default: Get Channels. |
| New Channel Name | Only in Create Channel, where it is required. The new channel’s name, in lowercase and without spaces; spaces are turned into hyphens. It only accepts unaccented letters, numbers, hyphens and underscores. |
| Private Channel | Only in Create Channel. Turn it on to create a private channel; otherwise it is public. |
| Channel Selection Method | In Channel Invite and Get Users Channel. How you point to the channel: Manual ID shows Channel ID to type its ID; Channel List shows Channel Name to pick it from a list. Default: Manual ID. |
| Channel ID | The channel’s ID, for example C123456. In Channel Invite, the channel you invite to; in Get Users Channel, the channel whose members you want. In Get Channels it is optional: if you give it, only that channel is returned. |
| Channel Name | With Channel List. The channel, picked from the list of channels in your workspace. The list loads when you pick the credential. |
| User Name | In Channel Invite and Get Channel User Profile. The person, by their username, full name or Slack ID. |
Operations
| Operation | What it does |
|---|---|
Channel Invite | Invites a person to a channel. |
Create Channel | Creates a public or private channel. |
Get Channels | Returns the list of public and private channels your app can see, excluding archived ones. |
Get Users Channel | Returns the members of a channel, one item per person with their ID (user_id) and username (user_name). |
Get Channel User Profile | Returns a person’s profile: name, job title, email and other details they have in Slack. |
Advanced options
| Field | What it does |
|---|---|
| Number of Results | Only in Get Channels. The maximum number of channels of each kind, public and private, to return. Default: 4. |
Output
The Data output returns the channels or the profile you worked with. Each channel has its ID (id), its name (name) and the other details Slack provides, such as whether it is private or how many members it has. Get Channel User Profile returns the person’s profile details.
You can use the channel ID in Messages to post in it. The component can also be connected to an Agent as a tool. See Tool Mode.
Example
A design agency opens a channel for every project it signs.
- The new project reaches the flow from the CRM with the customer’s name and the project manager’s Slack username.
- Add Channels with the
Create Channeloperation and writeproject-followed by the customer’s name in New Channel Name. - Add a second Channels with
Channel Invite, the new channel’sidin Channel ID and the project manager in User Name. - Finish with Messages to post a welcome message with the project details in the channel.
Good practices
- If you filter with Channel ID in
Get Channelsand the channel does not show up, increase Number of Results: the channel is searched among the channels returned. - To invite someone to a private channel, your app must be a member of that channel.
Related components
- Messages: sends, schedules and manages Slack messages.