Configure Slack¶
MOI connects to a Slack app through Socket Mode. Prepare the app’s App ID, App-Level Token, and Bot Token. No public domain, callback URL, or tool instance is required.
Console menu locations can change. Use the current Slack interface to find the settings and credentials described below.
1. Create a Slack app¶
Open Slack API Apps, create a blank app, and select the target workspace.
Record its App ID.
2. Enable Socket Mode and configure permissions¶
Enable Socket Mode. Create an App-Level Token with
connections:write. This token starts withxapp-.Enable Event Subscriptions and subscribe to the required Bot Events, such as
app_mentionandmessage.im.Under OAuth & Permissions → Bot Token Scopes, add the scopes for your use cases below.
Install the app to the target workspace and obtain its Bot Token, which starts with
xoxb-.
Use case |
Bot Token scope |
Event subscription |
|---|---|---|
Receive direct messages |
|
|
Receive messages mentioning the bot in a channel |
|
|
Send replies |
|
No additional event |
Read files sent by users |
|
The message event for the conversation |
Send files generated by the agent |
|
No additional event |
The App-Level Token’s connections:write scope establishes the Socket Mode connection. The Bot Token still needs the corresponding scopes to receive messages and transfer files. See Slack’s scope documentation[1][2][3][4][5].
After changing Bot Token scopes, follow Slack’s prompts to reinstall and authorize the app. Update the tokens in MOI if they have changed.
3. Configure the connection in MOI¶
Open the target agent card’s ⋯ menu and select Two-way messaging.
Select Slack App / Bot. If a receiving-method selector is shown, choose Long-lived connection.
Enter App ID, App-Level Token, and Bot Token. Both tokens are required for a new connection. When editing an existing connection, leave a token blank to keep its current value, or enter a new value and save to replace it.
Select a Runtime model.
Click Save and continue to start connecting.
4. Test the connection¶
In MOI, check for Configuration saved and MOI receiving enabled, then wait for Connection established.
Send the bot a direct message in Slack, or invite it to a test channel and mention it in a message.
Confirm Real message received in MOI, then confirm that the agent replies in the original Slack conversation or reply thread.
Real message received confirms incoming-message reception only. If no reply arrives, check the runtime model and the execution result in the corresponding MOI conversation. See Connection status and troubleshooting.