Channels
The Channels component acts as your bridge to manage communication spaces within Slack. It allows you to automatically create new channels, invite team members, and retrieve specific details about existing channels. This tool is essential for building automated workflows that organize team collaboration spaces without manual intervention.
How it Works
This component connects directly to the Slack API. When you configure it, it uses your authentication credentials to talk to Slack’s servers. Depending on the operation you select, it will perform specific actions:
- Creating: It sends a request to Slack to set up a new channel with a specific name and privacy setting.
- Inviting: It adds specific users to an existing channel.
- Retrieving: It fetches a list of channels or detailed information about a specific one, which you can then use in later steps of your automation.
Connection & Credentials
To use this component, you must first set up a connection to your Slack workspace:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type Slack bot API. You will need to sign in to the Slack API dashboard to obtain an OAuth App token.
- In your workflow, select this saved credential in the Credential input field of this node.
Note: Ensure your Slack API token has the necessary permissions (such as
channels:writeandusers:read) for the automation to work correctly.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Channel Invite: Allows you to invite specific users to an existing channel.
- Create Channel: Allows you to create a new channel in your workspace, defining its name and whether it is private or public.
- Get Channels: Allows you to retrieve a list of channels, optionally filtered by a specific channel ID or limited by a number of results.
- Get Users Channel: Allows you to get information about channels that a specific user is a member of.
- Get Chanel User Profile: Allows you to retrieve the profile information of a user within the context of a channel.
To use the component, first select the operation you need in the “Operation” field.
CRITICAL INSTRUCTION FOR THE MODEL: Operation names in the list above MUST be copied EXACTLY as they appear in “Additional Component Information” (in English). Do NOT modify them. Do NOT include this warning in the final documentation.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
- Operation: Select the action you want to perform.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- Channel ID: The unique ID of the channel (e.g., C123456). For ‘Get Channels’, this acts as an optional filter. If left empty, it returns all channels.
- Visible in: Channel Invite, Get Users Channel
- Channel Name: Select a channel from the list.
- Visible in: Channel Invite, Get Users Channel
- Channel Selection Method: Choose how you want to specify the channel.
- Visible in: Channel Invite, Get Users Channel
- Private Channel: Defines whether the channel will be private or public.
- Visible in: Create Channel
- Mapping Mode: Enable mapping mode to process multiple data records in batch.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- New Channel Name: The name of the new channel to create. Must be lowercase, alphanumeric, and contain no spaces.
- Visible in: Create Channel
- User Name: The username required for the operation.
- Visible in: Channel Invite, Get Chanel User Profile
- Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- Tools arguments metadata: Defines the arguments metadata for the tools.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- Number of Results: The maximum number of channels to return. Only used for the ‘Get Channels’ operation.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
- User Name: The name or user ID to invite.
- Visible in: Channel Invite, Create Channel, Get Channels, Get Users Channel, Get Chanel User Profile
CRITICAL INSTRUCTION FOR THE MODEL: Field names (display_name) MUST be copied EXACTLY as they appear in “Additional Component Information” (in English). Do NOT translate field names. Do NOT include this warning in the final documentation.
Outputs
The component produces the following outputs after execution:
- Data: Contains the result of the operation. For example, if you created a channel, this will contain the channel’s details (ID, name, etc.). If you invited users, it will confirm the success.
- Tool: Provides the tool definition, allowing other agents or components to recognize and interact with this node as a functional tool within the automation ecosystem.
Output Data Example (JSON)json
{ “success”: true, “channels”: { “id”: “C012AB3CD”, “name”: “project-alpha”, “is_private”: true, “created”: 1625097600, “topic”: { “text”: “Alpha Project Discussion”, “creator”: “U012AB3CD”, “last_set”: 1625100000 } } }
Connectivity
This component is typically used as an action node within a workflow.
- Inputs: It connects to a Slack Bot API credential for authentication.
- Outputs: The
Dataoutput can be connected to other components that require aChannel ID(such as sending messages to that channel) or to components that process channel lists. TheTooloutput allows this node to be used by AI agents for decision-making.
Usage Example
Scenario: Automatically creating a private channel for a new sales project.
- Create Channel: Set the operation to Create Channel.
- Configuration:
- Enter
new-project-alphain the New Channel Name field (ensure it is lowercase with no spaces). - Check the Private Channel box to keep it secure.
- Enter
- Execution: When the workflow runs, a new private channel named
new-project-alphais created in your Slack workspace. - Next Step: You can then take the
idfrom the Data output and use it in a subsequent “Send Message” component to welcome users to the new channel.
Important Notes
🔒 Protect Your Slack Token The API token is highly privileged. Store it securely and avoid logging or exposing it in plain text. Compromised tokens can grant full access to your workspace.
⚠️ Component Still in Development This SlackChannelComponent is marked as in development. Some features may not work reliably or could change without notice. Use with caution and verify outputs before production use.
📋 Slack API Token Required To use this component, you must supply a valid Slack API token with the necessary permissions (e.g., channels:write, users:read). Without this token, channel operations will fail.
💡 Avoid Excessive Channel Creation Creating many channels in a short period may hit Slack rate limits. Schedule or batch channel creation to stay within limits and keep your workspace organized.
⚙️ Channel Naming Rules Channel names must be lowercase, alphanumeric, and can include hyphens. Avoid spaces or special characters to prevent creation errors.
ℹ️ Returned Channel ID Usage When a channel is created, the component returns a channel ID. Use this ID for subsequent operations such as inviting users or fetching channel details.
Tips and Best Practices
- Always verify that your Slack Bot Token has the
channels:writepermission if you plan to create channels. - Use the Mapping Mode if you need to create or manage multiple channels from a list of data in a single workflow execution.
- When creating channels, use clear, descriptive names that follow your organization’s naming conventions (e.g.,
proj-client-name).
Security Considerations
Ensure that the Slack API Token used in your credentials has the minimum necessary permissions (Principle of Least Privilege). Do not share workflow files containing these tokens publicly.