ChatBotKit offers powerful integration with Slack, enabling you to deploy intelligent AI agents directly within your Slack workspace. This integration allows your team to interact with AI-powered assistants seamlessly through Slack channels, direct messages, and slash commands.

Whether you're looking to streamline customer support, automate routine tasks, or enhance team collaboration, ChatBotKit's Slack integration provides the tools you need to create engaging and helpful bot experiences.

Step-by-Step Installation Guide

Here's how to integrate ChatBotKit with your Slack workspace:

Phase 1: Create Your Slack Bot

  1. Navigate to Integrations in your ChatBotKit dashboard
  2. Click the Slack Bot button to start the setup process
  3. Configure your bot's basic settings:
    • Name: Choose a clear, memorable name for your bot
    • Backstory: Define your bot's personality and purpose (this guides how it responds)
    • Model: Select your preferred AI model
    • Dataset: Optionally connect a Dataset for specialized knowledge
    • Skillset: Add a Skillset for enhanced capabilities
  4. Click "Create" to save your integration settings

Phase 2: Install to Slack

Once your integration is created, you'll need to install it to your Slack workspace:

  1. Click the "Install" button in your ChatBotKit integration settings
  2. This opens the Slack installation process in a new tab
  3. Select the Slack workspace where you want to install your bot
  4. Review the permissions your bot will request
  5. Click "Allow" to complete the Slack app installation

Phase 3: Configure Authentication

The final step requires copying credentials from Slack back to ChatBotKit:

Get Your Signing Secret

  1. In the Slack app tab (still open from the previous step), navigate to "Basic Information"
  2. Scroll down to find the "Signing Secret" section
  3. Click "Show" and copy the signing secret value
  4. Return to your ChatBotKit integration and paste it into the "Signing Secret" field

Get Your Bot Token

  1. In the same Slack app tab, go to "OAuth & Permissions"
  2. Find the "Bot User OAuth Token" section
  3. Copy the token (it starts with xoxb-)
  4. Paste it into the "Bot Token" field in ChatBotKit

Note: If you don't see a bot token, click the "Install to Workspace" button first, then return to this section.

How to Interact with Your Slack Bot

Once installed, there are several ways to interact with your ChatBotKit bot in Slack:

Channel Conversations

  1. Invite the bot to a channel: Use /invite @YourBotName in any channel
  2. Start conversations: Mention your bot with @YourBotName followed by your message
  3. Continue in threads: The bot will reply in a thread to keep conversations organized

Example:

The bot will respond in a thread, and all follow-up messages in that thread become part of the same conversation.

Direct Messages

For private conversations with your bot:

  1. Click on your bot's name in the workspace sidebar
  2. Start typing your message directly - no need to use @ mentions in DMs
  3. The bot responds immediately, just like chatting with a team member

Slash Commands

Use the built-in slash command for quick, private interactions:

  1. Type /botname your question in any channel
  2. The response appears only to you (ephemeral message)
  3. Perfect for getting help without interrupting channel conversations

Advanced Features

Visible Messages for Context (Beta)

The Visible Messages feature enables your bot to understand conversation context by considering recent channel messages.

How it works:

  • Default behavior (visibleMessages: 0): Each bot interaction starts fresh
  • Enhanced context (visibleMessages: 10): Bot considers the last 10 messages as context

Example use case: If someone shares an error message in a support channel, then asks the bot "What does this error mean?", the bot can reference the previous error message to provide specific help.

To enable:

  1. Go to your Slack integration settings in ChatBotKit
  2. Set the Visible Messages field to your desired number (typically 5-10)
  3. Save your changes

This feature is particularly valuable in:

  • Support channels where errors are shared
  • Project channels with ongoing discussions
  • Any scenario where context from recent messages helps the bot provide better responses

File Attachments (Beta)

The File Attachments feature allows users to share files directly with your bot for processing and analysis.

How it works:

  • Default behavior (attachments: false): Users can only send text messages
  • Enhanced functionality (attachments: true): Users can upload files that the bot can process and respond to

Example use case: Users can upload documents, images, spreadsheets, or other files directly in Slack conversations. The bot can analyze the content, answer questions about the files, or provide summaries and insights based on the uploaded material.

To enable:

  1. Go to your Slack integration settings in ChatBotKit
  2. Enable the Attachments toggle (marked as BETA)
  3. Save your changes

Supported file types:

  • Documents (PDF, Word, text files)
  • Images (JPEG, PNG, GIF)
  • Spreadsheets (Excel, CSV)
  • And many other common file formats

This feature is particularly valuable for:

  • Technical support scenarios where users need to share error logs or screenshots
  • Document analysis and summarization tasks
  • Content review and feedback workflows
  • Any scenario where visual or document context enhances the conversation

Interactive References (Beta)

The References feature enhances the user experience by providing easy access to source information and citations used in bot responses.

How it works:

  • Default behavior (references: false): Bot responses appear without reference buttons
  • Enhanced transparency (references: true): Interactive "View References" buttons appear when responses contain citations

Example use case: When your bot answers a question about company policies and cites specific documents, users can click the "πŸ“„ View References" button to see exactly which sources were used, including document names and relevant excerpts.

To enable:

  1. Go to your Slack integration settings in ChatBotKit
  2. Enable the References toggle (marked as BETA)
  3. Save your changes

User Experience:

  • A "πŸ“„ View References (X)" button appears below responses that contain citations
  • Clicking the button opens a modal showing all referenced sources
  • Each reference includes the source name, description, and relevant content
  • References are temporarily stored and accessible for one hour after the response

This feature is particularly valuable for:

  • Knowledge base responses with document citations
  • Policy or procedure explanations requiring source verification
  • Technical support responses referencing specific documentation
  • Any scenario where users need to verify or explore the sources behind bot responses

User Feedback Collection (Beta)

The Ratings feature allows users to provide thumbs up (πŸ‘) and thumbs down (πŸ‘Ž) reactions to bot responses, giving you valuable insights into response quality and effectiveness.

When enabled, thumbs up and thumbs down buttons appear below every bot response, allowing users to quickly indicate response quality.

Example use case: After your support bot provides a solution, users can immediately indicate whether the response was helpful. This data helps you identify which types of responses work well and which areas need improvement.

To enable:

  1. Go to your Slack integration settings in ChatBotKit
  2. Enable the Ratings toggle (marked as BETA)
  3. Save your changes

User Experience:

  • πŸ‘ (thumbs up) and πŸ‘Ž (thumbs down) buttons appear on the same line as reference buttons below bot responses
  • Thumbs up: Users can click once to provide positive feedback - no additional steps required
  • Thumbs down: Users are prompted with a dialog to optionally provide their reason for downvoting (up to 500 characters)
  • Users receive immediate confirmation when feedback is submitted
  • Feedback is stored securely and cannot be changed once submitted

Analytics and Insights:

  • All feedback is collected and available through your ChatBotKit analytics dashboard
  • Track response effectiveness trends over time
  • Identify common issues or highly successful response patterns
  • Export feedback data for further analysis and reporting

This feature is particularly valuable for:

  • Customer support quality monitoring
  • Training data improvement identification
  • Bot performance optimization
  • Measuring user satisfaction trends
  • A/B testing different response approaches

Rich Message Formatting

Your ChatBotKit Slack bot supports full Slack formatting capabilities:

  • Text formatting: italics, bold, strikethrough, code
  • Hyperlinks: link text
  • Emoji support: Use Slack's emoji codes like :smile: or :thumbsup:
  • Code blocks: For sharing formatted code snippets
  • Lists: Both bulleted and numbered lists
  • Mentions: The bot can mention users and channels when appropriate
  • Images: The bot can process and respond to images shared in conversations

Multi-User Conversations

Multiple team members can participate in the same bot conversation thread:

  • Each thread maintains its own conversation history
  • Users can jump in and out of ongoing discussions
  • The bot tracks the context for all participants
  • Perfect for collaborative problem-solving sessions

Slack App Configuration Reference

For users who need to modify their Slack app settings or troubleshoot permissions, here are the key configuration areas:

Required Bot Permissions

Ensure your Slack app has these Bot Token Scopes in "OAuth & Permissions":

  • app_mentions:read - Allows the bot to see when it's mentioned
  • groups:history - Allows reading private channel messages
  • chat:write - Permits sending messages to channels and DMs
  • channels:history - Enables reading public channel messages
  • im:history - Enables reading direct message history
  • mpim:history - Allows reading group direct message history
  • users:read - Permits reading user profile information
  • commands - Required for slash command functionality

Event Subscriptions Setup

If you need to manually configure event subscriptions:

  1. Go to "Event Subscriptions" in your Slack app settings

  2. Enable events and set the Request URL to:

    (Replace [slackIntegrationId] with your actual integration ID from the ChatBotKit URL)

  3. Subscribe to these bot events:

    • app_mention - When bot is mentioned in channels
    • message.channels - Public channel messages
    • message.groups - Private channel messages
    • message.im - Direct messages
    • message.mpim - Group direct messages

Slash Commands Setup

If you need to manually configure slash commands:

  1. Go to "Slash Commands" in your Slack app settings

  2. Click "Create New Command"

  3. Set the Request URL to: (Replace [slackIntegrationId] with your actual integration ID from the ChatBotKit URL)

  4. Configure the command name (typically matches your bot name in lowercase)

  5. Add a description: "Interact with [Your Bot Name] in any channel or direct message"

  6. Set usage hint: "ask a question or give a command"

Interactive Components Setup

If you need to manually configure interactive components (for References feature):

  1. Go to "Interactivity & Shortcuts" in your Slack app settings

  2. Turn on "Interactivity"

  3. Set the Request URL to: (Replace [slackIntegrationId] with your actual integration ID from the ChatBotKit URL)

  4. This endpoint handles button clicks and other interactive elements like the References feature

App Home Configuration

To enable direct messaging through the App Home:

  1. Navigate to "App Home" in your Slack app settings
  2. Enable "Allow users to send Slash commands and messages from the messages tab"
  3. This allows users to find and message your bot directly from the Apps section

ChatBotKit Integration Settings

In addition to Slack app configuration, you can customize your ChatBotKit integration behavior:

References (Beta)

  • Property: references (Boolean)
  • Default: false (disabled)
  • Description: When enabled, displays interactive "View References" buttons below bot responses that contain citations or source material
  • Use Cases: Knowledge base responses, policy explanations, technical documentation references

Visible Messages (Beta)

  • Property: visibleMessages (Number)
  • Default: 0 (disabled)
  • Description: Number of recent channel messages to include as context for bot responses
  • Recommended Range: 5-10 messages for optimal context without overwhelming the bot
  • Use Cases: Support channels, ongoing project discussions, contextual conversations

Contact Collection

  • Property: contactCollection (Boolean)
  • Default: false (disabled)
  • Description: Enables collection and storage of user contact information during conversations

Session Duration

  • Property: sessionDuration (Number)
  • Default: null (unlimited)
  • Description: Maximum duration (in minutes) for conversation sessions before automatic reset

Attachments (Beta)

  • Property: attachments (Boolean)
  • Default: false (disabled)
  • Description: Allows users to share files, documents, and images with the bot for processing and analysis
  • Supported Types: Documents, images, spreadsheets, and other common file formats

These settings can be configured through your ChatBotKit integration dashboard at chatbotkit.com/integrations.

Troubleshooting

Common Issues and Solutions

Bot not responding to messages in channels

Symptoms: Bot doesn't reply when mentioned in channels or threads

Solutions:

  1. Check permissions: Verify your bot has all required Bot Token Scopes listed above
  2. Verify installation: Make sure the bot is properly installed in your workspace
  3. Test in DM first: Try messaging the bot directly to confirm it's working
  4. Check integration status: Ensure your ChatBotKit integration is active and properly configured
  5. Review error logs: Check your ChatBotKit integration logs for error messages

Steps to fix permissions:

  1. Go to your Slack App Dashboard
  2. Select your app and navigate to "OAuth & Permissions"
  3. Add any missing Bot Token Scopes from the required list
  4. Save changes and reinstall the app to your workspace if needed
Cannot message bot directly through App Home

Symptoms: Users can't start direct conversations with the bot from Slack's Apps section

Solution:

  1. Go to your Slack App Dashboard and select your app
  2. Navigate to "App Home"
  3. Enable "Allow users to send Slash commands and messages from the messages tab"
  4. Save your changes

This setting allows users to discover and message your bot directly through Slack's interface.

Bot responses seem irrelevant or ignore context

Symptoms: Bot doesn't consider previous messages or conversation context

Solutions:

  1. Enable Visible Messages: Set the visibleMessages parameter to 5-10 in your integration settings
  2. Review backstory: Ensure your bot's backstory provides clear guidance for the conversation context
  3. Check thread usage: Make sure conversations are happening in threads for proper context tracking
  4. Verify model selection: Some AI models handle context better than others
Authentication or webhook errors

Symptoms: Bot installation fails or shows authentication errors

Solutions:

  1. Double-check credentials: Ensure Signing Secret and Bot Token are copied correctly
  2. Verify token format: Bot token should start with xoxb-
  3. Check expiration: Regenerate tokens if they're old or expired
  4. Test webhook URL: Confirm the event subscription URL is correctly formatted
  5. Review workspace permissions: Ensure you have admin rights to install apps
Slash command not working

Symptoms: Typing /botname doesn't trigger the bot or shows an error

Solutions:

  1. Check command registration: Ensure the slash command was properly created during installation
  2. Verify app installation: Confirm the bot is installed in the current workspace
  3. Test alternative methods: Try mentioning the bot directly or using DMs to confirm it's functional
  4. Reinstall if necessary: Sometimes reinstalling the Slack app resolves command issues

Best Practices

Security Considerations

  • Protect your credentials: Never share your Bot Token or Signing Secret publicly
  • Review permissions regularly: Audit your bot's permissions to ensure they match your needs
  • Monitor bot activity: Keep track of your bot's usage and conversations
  • Update regularly: Keep your integration up to date with the latest features and security improvements

Optimizing Bot Performance

  • Clear backstories: Write specific, clear instructions for your bot's behavior
  • Appropriate datasets: Connect relevant datasets to improve response accuracy
  • Context management: Use Visible Messages thoughtfully - too much context can be overwhelming
  • Regular testing: Test your bot regularly to ensure it's performing as expected

Team Adoption Tips

  • Introduce gradually: Start with a small team or specific channels before rolling out workspace-wide
  • Provide examples: Show team members effective ways to interact with the bot
  • Set expectations: Clearly communicate what the bot can and cannot do
  • Gather feedback: Regularly collect user feedback to improve the bot experience
  • Create guidelines: Establish team guidelines for when and how to use the bot

By following this guide, you'll have a fully functional ChatBotKit Slack integration that enhances your team's productivity and provides valuable AI assistance directly within your Slack workspace.