Slack Integration Guide
This guide will help you integrate the Mica AI assistant into your Slack workspace, enabling intelligent conversational interactions with Slack users.
Prerequisites
- A Slack workspace with administrator privileges
- Basic understanding of Slack app configuration process
Configuration Steps
1. Create a Slack App
- Visit Slack API
- Click “Create New App”
- Choose “From Scratch”
- Name your app
- Select your workspace
2. Configure Bot User
- Select “Bot Users” from the left menu
- Click “Add a Bot User”
- Set the Bot’s display name and username
- Save settings
- Configure callback URL in “Event Subscriptions”:
- Set callback URL (Webhook URL):
https://{your-Mica-server-domain}/v1/slack/webhook/{bot_name}
For example: If your domain is
mica-labs.github.io
and bot name ismica
, the callback URL should be:https://mica-labs.github.io/v1/slack/webhook/mica
- Set callback URL (Webhook URL):
- Add the following events in “Subscribe to bot events”:
message.channels
message.groups
message.im
message.mpim
3. Configure Incoming Webhook
- Select “Incoming Webhooks” from the left menu
- Enable Incoming Webhooks
- Click “Add New Webhook to Workspace”
- Choose the channel for sending messages
- Copy the generated Webhook URL
4. Install App to Workspace
- Select “Install App” from the left menu
- Click “Install App to Workspace”
- Authorize the app to access your workspace
- Save the generated Bot User OAuth Token
5. Configure Mica
Add the following configuration to your Mica configuration file:
bot_name: mica # your bot name
llm_config:
headers:
Authorization: Bearer xxx # your authorization token
slack:
incoming_webhook: {your_incoming_webhook} # Webhook URL obtained from Slack
Test Steps
- Send a test message in the configured target channel
- Verify that the Mica AI assistant can correctly receive and respond to messages
Common Issues
- Message Sending Failure
- Check if the Webhook URL is correct
- Confirm if the Webhook is still valid
- Verify if the target channel exists and has proper permissions
- Connection Issues
- Check network connection status
- Confirm if the server can access Slack API