Slack
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
- Navigate to Integrations in your ChatBotKit dashboard
- Click the Slack Bot button to start the setup process
- Configure your bot's basic settings:
- 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:
- Click the "Install" button in your ChatBotKit integration settings
- This opens the Slack installation process in a new tab
- Select the Slack workspace where you want to install your bot
- Review the permissions your bot will request
- 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
- In the Slack app tab (still open from the previous step), navigate to "Basic Information"
- Scroll down to find the "Signing Secret" section
- Click "Show" and copy the signing secret value
- Return to your ChatBotKit integration and paste it into the "Signing Secret" field
Get Your Bot Token
- In the same Slack app tab, go to "OAuth & Permissions"
- Find the "Bot User OAuth Token" section
- Copy the token (it starts with
xoxb-
) - 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
- Invite the bot to a channel: Use
/invite @YourBotName
in any channel - Start conversations: Mention your bot with
@YourBotName
followed by your message - 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:
- Click on your bot's name in the workspace sidebar
- Start typing your message directly - no need to use
@
mentions in DMs - The bot responds immediately, just like chatting with a team member
Slash Commands
Use the built-in slash command for quick, private interactions:
- Type
/botname your question
in any channel - The response appears only to you (ephemeral message)
- 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:
- Go to your Slack integration settings in ChatBotKit
- Set the Visible Messages field to your desired number (typically 5-10)
- 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:
- Go to your Slack integration settings in ChatBotKit
- Enable the Attachments toggle (marked as BETA)
- 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:
- Go to your Slack integration settings in ChatBotKit
- Enable the References toggle (marked as BETA)
- 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:
- Go to your Slack integration settings in ChatBotKit
- Enable the Ratings toggle (marked as BETA)
- 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 mentionedgroups:history
- Allows reading private channel messageschat:write
- Permits sending messages to channels and DMschannels:history
- Enables reading public channel messagesim:history
- Enables reading direct message historympim:history
- Allows reading group direct message historyusers:read
- Permits reading user profile informationcommands
- Required for slash command functionality
Event Subscriptions Setup
If you need to manually configure event subscriptions:
-
Go to "Event Subscriptions" in your Slack app settings
-
Enable events and set the Request URL to:
(Replace
[slackIntegrationId]
with your actual integration ID from the ChatBotKit URL) -
Subscribe to these bot events:
app_mention
- When bot is mentioned in channelsmessage.channels
- Public channel messagesmessage.groups
- Private channel messagesmessage.im
- Direct messagesmessage.mpim
- Group direct messages
Slash Commands Setup
If you need to manually configure slash commands:
-
Go to "Slash Commands" in your Slack app settings
-
Click "Create New Command"
-
Set the Request URL to: (Replace
[slackIntegrationId]
with your actual integration ID from the ChatBotKit URL) -
Configure the command name (typically matches your bot name in lowercase)
-
Add a description: "Interact with [Your Bot Name] in any channel or direct message"
-
Set usage hint: "ask a question or give a command"
Interactive Components Setup
If you need to manually configure interactive components (for References feature):
-
Go to "Interactivity & Shortcuts" in your Slack app settings
-
Turn on "Interactivity"
-
Set the Request URL to: (Replace
[slackIntegrationId]
with your actual integration ID from the ChatBotKit URL) -
This endpoint handles button clicks and other interactive elements like the References feature
App Home Configuration
To enable direct messaging through the App Home:
- Navigate to "App Home" in your Slack app settings
- Enable "Allow users to send Slash commands and messages from the messages tab"
- 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:
- Check permissions: Verify your bot has all required Bot Token Scopes listed above
- Verify installation: Make sure the bot is properly installed in your workspace
- Test in DM first: Try messaging the bot directly to confirm it's working
- Check integration status: Ensure your ChatBotKit integration is active and properly configured
- Review error logs: Check your ChatBotKit integration logs for error messages
Steps to fix permissions:
- Go to your Slack App Dashboard
- Select your app and navigate to "OAuth & Permissions"
- Add any missing Bot Token Scopes from the required list
- 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:
- Go to your Slack App Dashboard and select your app
- Navigate to "App Home"
- Enable "Allow users to send Slash commands and messages from the messages tab"
- 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:
- Enable Visible Messages: Set the
visibleMessages
parameter to 5-10 in your integration settings - Review backstory: Ensure your bot's backstory provides clear guidance for the conversation context
- Check thread usage: Make sure conversations are happening in threads for proper context tracking
- Verify model selection: Some AI models handle context better than others
Authentication or webhook errors
Symptoms: Bot installation fails or shows authentication errors
Solutions:
- Double-check credentials: Ensure Signing Secret and Bot Token are copied correctly
- Verify token format: Bot token should start with
xoxb-
- Check expiration: Regenerate tokens if they're old or expired
- Test webhook URL: Confirm the event subscription URL is correctly formatted
- 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:
- Check command registration: Ensure the slash command was properly created during installation
- Verify app installation: Confirm the bot is installed in the current workspace
- Test alternative methods: Try mentioning the bot directly or using DMs to confirm it's functional
- 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.