Features
- Real-time Notifications: Get instant alerts for new conversations and messages
- Bidirectional Messaging: Reply to customers directly from Slack
- Channel Management: Connect specific Slack channels to Chatwoot
- Team Collaboration: Leverage Slack’s collaboration features for support
- Message History: Access conversation history within Slack threads
- Link Unfurling: Preview Chatwoot conversation links in Slack
Prerequisites
- Admin access to your Chatwoot account
- Admin access to your Slack workspace
- Slack Client ID and Client Secret configured in Chatwoot environment variables:
SLACK_CLIENT_IDSLACK_CLIENT_SECRET
Setup Instructions
Step 1: Configure Slack App Credentials
First, ensure your Chatwoot instance has Slack OAuth credentials configured. These should be set as environment variables:Step 2: Connect Slack from Chatwoot
- Navigate to Settings > Integrations in your Chatwoot dashboard
- Find Slack in the integrations list
- Click Connect to initiate the OAuth flow
- You’ll be redirected to Slack’s authorization page
- Select the Slack workspace you want to connect
- Review the requested permissions and click Allow
Step 3: Select Slack Channel
After authorization:- You’ll be redirected back to Chatwoot
- Select which Slack channel should receive notifications
- Click Update to save your channel selection
Step 4: Test the Integration
- Create a test conversation in Chatwoot
- Verify that a notification appears in your configured Slack channel
- Try replying to the conversation from Slack
- Confirm the reply appears in Chatwoot
Slack Permissions
The integration requests the following Slack permissions:commands: Enable slash commandschat:write: Send messages as the botchannels:read: View basic channel informationchannels:manage: Manage channel settingschannels:join: Join public channelschannels:history: Read message history in public channelsgroups:read: View private channel informationgroups:write: Send messages to private channelsgroups:history: Read message history in private channelsim:write: Send direct messagesim:history: Read direct message historympim:write: Send messages to group DMsmpim:history: Read group DM historyusers:read: View user informationusers:read.email: View user email addresseschat:write.customize: Customize message appearancefiles:read: Access file informationfiles:write: Upload and share files
API Integration
You can also manage the Slack integration programmatically:Create Integration
List Available Channels
Update Channel
Delete Integration
Implementation Details
The Slack integration is implemented using:- Hook Model:
Integrations::Hookwithapp_id: 'slack' - Hook Type: Account-level integration
- OAuth Flow: Uses Slack OAuth v2
- Builder Service:
Integrations::Slack::HookBuilder - Channel Management:
Integrations::Slack::ChannelBuilder - Message Services:
Integrations::Slack::IncomingMessageBuilderIntegrations::Slack::SendOnSlackServiceIntegrations::Slack::SlackLinkUnfurlService
Hook Configuration
The integration stores:Disabling and Re-enabling
You can temporarily disable the Slack integration without removing it:- Navigate to Settings > Integrations
- Find your Slack integration
- Toggle the Status to disabled
- Re-enable when needed
Troubleshooting
Integration Not Appearing
Issue: Slack integration doesn’t appear in the integrations list. Solution: EnsureSLACK_CLIENT_SECRET environment variable is properly configured.
Channel Not Receiving Notifications
Issue: No messages appear in the configured Slack channel. Solution:- Verify the integration status is “enabled”
- Check that the bot has been invited to the channel
- Review Slack app permissions
- Test with a new conversation
OAuth Redirect Error
Issue: Error during OAuth redirect. Solution: Verify that the redirect URI in your Slack app settings matches:Invalid Channel ID
Issue: “Invalid channel ID” error when updating channel. Solution:- Use the channel listing API to get valid channel IDs
- Ensure the bot has access to the selected channel
- Verify the channel still exists in your workspace
Removing the Integration
To completely remove the Slack integration:- Navigate to Settings > Integrations
- Find the Slack integration
- Click Delete or Remove
- Confirm the deletion
Security Notes
- Access tokens are encrypted when encryption is configured
- Tokens are stored using deterministic encryption
- Only administrators can configure integrations
- OAuth flow uses state parameter for CSRF protection
- Redirect URIs are validated during OAuth
Next Steps
- Configure notification preferences for your team
- Set up routing rules to direct conversations to specific channels
- Train your team on responding from Slack
- Explore other integrations to enhance your workflow

