Skip to main content

Overview

Enable your agents to manage team communication through Slack. Send messages, search conversations, manage channels, and coordinate team activities to streamline your collaboration workflows with AI-powered automation.

Prerequisites

Before using the Slack integration, ensure you have:
  • A CrewAI AMP account with an active subscription
  • A Slack workspace with appropriate permissions
  • Connected your Slack workspace through the Integrations page

Setting Up Slack Integration

1. Connect Your Slack Workspace

  1. Navigate to CrewAI AMP Integrations
  2. Find Slack in the Authentication Integrations section
  3. Click Connect and complete the OAuth flow
  4. Grant the necessary permissions for team communication
  5. Copy your Enterprise Token from Integration Settings

2. Install Required Package

3. Environment Variable Setup

To use integrations with Agent(apps=[]), you must set the CREWAI_PLATFORM_INTEGRATION_TOKEN environment variable with your Enterprise Token.
Or add it to your .env file:

Available Tools

User Management

Description: List all members in a Slack channel.Parameters:
  • No parameters required - retrieves all channel members
Description: Find a user in your Slack workspace by their email address.Parameters:
  • email (string, required): The email address of a user in the workspace
Description: Search for users by their name or display name.Parameters:
  • name (string, required): User’s real name to search for
  • displayName (string, required): User’s display name to search for
  • paginationParameters (object, optional): Pagination settings
    • pageCursor (string, optional): Page cursor for pagination

Channel Management

Description: List all channels in your Slack workspace.Parameters:
  • No parameters required - retrieves all accessible channels

Messaging

Description: Send a message to a Slack channel.Parameters:
  • channel (string, required): Channel name or ID - Use Connect Portal Workflow Settings to allow users to select a channel, or enter a channel name to create a new channel
  • message (string, required): The message text to send
  • botName (string, required): The name of the bot that sends this message
  • botIcon (string, required): Bot icon - Can be either an image URL or an emoji (e.g., “:dog:”)
  • blocks (object, optional): Slack Block Kit JSON for rich message formatting with attachments and interactive elements
  • authenticatedUser (boolean, optional): If true, message appears to come from your authenticated Slack user instead of the application (defaults to false)
Description: Send a direct message to a specific user in Slack.Parameters:
  • memberId (string, required): Recipient user ID - Use Connect Portal Workflow Settings to allow users to select a workspace member
  • message (string, required): The message text to send
  • botName (string, required): The name of the bot that sends this message
  • botIcon (string, required): Bot icon - Can be either an image URL or an emoji (e.g., “:dog:”)
  • blocks (object, optional): Slack Block Kit JSON for rich message formatting with attachments and interactive elements
  • authenticatedUser (boolean, optional): If true, message appears to come from your authenticated Slack user instead of the application (defaults to false)

Search & Discovery

Description: Search for messages across your Slack workspace.Parameters:
  • query (string, required): Search query using Slack search syntax to find messages that match specified criteria
Search Query Examples:
  • "project update" - Search for messages containing “project update”
  • from:@john in:#general - Search for messages from John in the #general channel
  • has:link after:2023-01-01 - Search for messages with links after January 1, 2023
  • in:@channel before:yesterday - Search for messages in a specific channel before yesterday

Block Kit Integration

Slack’s Block Kit allows you to create rich, interactive messages. Here are some examples of how to use the blocks parameter:

Simple Text with Attachment

Rich Formatting with Sections

Usage Examples

Basic Slack Agent Setup

Filtering Specific Slack Tools

Advanced Messaging with Block Kit

Message Search and Analytics

Contact Support

Need Help?

Contact our support team for assistance with Slack integration setup or troubleshooting.