Integrate with Platform: Slack
Pre-Connection Checklist
An "AI Assistant" has been created on the MaiAgent platform
You have administrator permissions for a Slack Workspace
Quick Install: Use an App Manifest
Go to the Slack API, click Create New App, select From a manifest, and choose the Workspace where you want to install the App. Switch to the YAML tab and paste the complete manifest below:
display_information:
name: MaiAgentBot
features:
app_home:
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: MaiAgentBot
always_online: false
oauth_config:
scopes:
bot:
- chat:write
- users:read
- im:history
- channels:history
- groups:history
- files:read
- app_mentions:read
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: falseMaiAgentBot is an example name. You can customize display_information.name and features.bot_user.display_name before creating the App.
Step 1: Create a Slack App
1. Go to Slack API to Create an App
Go to https://api.slack.com/apps and click Create an App.
2. Select From scratch
Select From scratch to manually configure using the graphical interface.
3. Enter App Name and Workspace
Enter the App name (e.g., MaiAgentBot) and select the Slack Workspace to install it in, then click Create App.
4. Obtain the Signing Secret
After creation, go to the Basic Information page and find the Signing Secret in the App Credentials section. Click Show and copy it for later use.
Step 2: Configure Bot Permissions
1. Go to OAuth & Permissions
Click OAuth & Permissions in the left menu.
2. Add Bot Token Scopes
Scroll down to the Bot Token Scopes section, click Add an OAuth Scope, and add the following permissions:
app_mentions:read
Read messages that @ mention the bot
channels:history
Read public channel message history
chat:write
Send messages
files:read
Read files (images/documents)
groups:history
Read private channel message history
im:history
Read direct message history
mpim:history
Read group direct message history
3. Install App to Workspace
Scroll back to the top of the page and click Install to Workspace (or Reinstall to Workspace).
Slack will redirect to the authorization page. After confirming the permissions, click Allow.
4. Copy the Bot User OAuth Token
After installation, return to the OAuth & Permissions page and copy the Bot User OAuth Token (format: xoxb-...).
Step 3: Configure App Home (Enable Direct Messages)
Go to the App Home page in the left menu and in the Show Tabs section:
Enable Messages Tab
Check Allow users to send Slash commands and messages from the messages tab
This step must be completed; otherwise, users cannot interact with the Bot via direct messages.
Step 4: Create a Slack Chat Platform in MaiAgent
1. Go to Connect Chat Platform
Click Chat Platforms in the MaiAgent left menu, then click Connect Chat Platform in the upper right corner and select Slack.
2. Enter Basic Settings
Name
Give this connection a name (required)
AI Assistant
Select the AI Assistant to bind
Bot User OAuth Token
Paste the Bot Token obtained in Step 2 (required)
Signing Secret
Paste the Signing Secret obtained in Step 1 (required)
3. Verify Credentials
Click the Verify Credentials button to confirm the Token and Secret are correct.
4. Chat Room Settings
Respond only when @ mentioned in groups
When enabled, the Bot only responds in group channels when @ mentioned
Enable reset command
When enabled, users can restart the conversation using a command
5. Save and Obtain the Webhook URL
Click Connect Chat Platform to complete the setup. The system will generate a Webhook URL — copy it for later use.
Step 5: Return to Slack App to Configure Event Subscriptions
1. Enable Events
Click Event Subscriptions in the Slack App left menu and turn on Enable Events.
2. Paste the Request URL
Paste the Webhook URL generated by MaiAgent into the Request URL field. Slack will automatically verify it — Verified ✓ indicates the setup is successful.
3. Subscribe to Bot Events
Expand the Subscribe to bot events section, click Add Bot User Event, and add the following events:
message.im
New messages in direct messages
message.channels
New messages in public channels
message.groups
New messages in private channels
message.mpim
New messages in group direct messages
app_mention
@ mentioned in a channel
4. Save Changes
Click Save Changes to complete the setup.
After saving, Slack may require you to reinstall the App. Click the prompt at the top of the page to reinstall and apply the new permissions.
Getting Started
After the connection is complete, you can interact with the AI Assistant in the following ways:
Direct Message Conversation
Send a direct message to the Bot in Slack, and the AI Assistant will reply automatically. Supports sending text, images, and files.
File Upload and Analysis
Users can upload Excel, PDF, and other files during conversations. The AI Assistant can read file content and answer related questions.
Channel @ Mention
In a channel, type @BotName your question, and the AI Assistant will reply in the channel.
Last updated
Was this helpful?
