Connect Slack
Tell your assistant you want to connect:Create a Slack App
Go to api.slack.com/apps and click Create New App. Choose From scratch, give it a name, and select the workspace you want to install it in.
Enable Socket Mode
In the left sidebar, go to Settings → Socket Mode and enable it. When prompted, create an App Token with the
connections:write scope. The token starts with xapp-. Copy it.Socket Mode is recommended for self-hosted setups because it does not require a publicly reachable URL — the connection is outbound from your machine to Slack.
Add bot token scopes
Go to OAuth & Permissions → Bot Token Scopes and add:
chat:write— send messageschannels:history,channels:read— read channel contentgroups:history— read private channel contentim:history,mpim:history— read direct messagesapp_mentions:read— receive @mention eventsusers:read— resolve user namesreactions:read,reactions:write— emoji reactionsfiles:read,files:write— file attachmentsassistant:write— streaming typing indicators
Subscribe to bot events
Go to Event Subscriptions, enable events, and subscribe to:
app_mention, message.channels, message.groups, message.im, message.mpim, reaction_added, reaction_removedEnable App Home
Go to App Home → Messages Tab and enable it. This allows users to DM your bot directly.
Install the app and copy the Bot Token
Go to OAuth & Permissions and click Install to Workspace. After installation, copy the Bot Token — it starts with
xoxb-.Socket Mode vs HTTP mode
| Mode | How it works | Requires public URL? |
|---|---|---|
| Socket Mode | Outbound WebSocket from your machine to Slack | No |
| HTTP mode | Slack sends POST requests to your webhook URL | Yes |
DM policy
| Policy | Behavior |
|---|---|
pairing | Unknown senders get a 6-digit code. You approve via the agent. |
allowlist | Only user IDs you specify can interact. |
open | Accept DMs from anyone in the workspace. |
Channel-specific settings
By default, the bot responds only when @mentioned in channels. To change this for a specific channel:Security
Slack is a messaging channel. The agent cannot run shell commands, execute processes, or invoke bash scripts from a Slack conversation — regardless of what the message says. This restriction is architectural. What Slack conversations can do: read files, search memory, send messages, use web tools, query APIs.Troubleshooting
Socket Mode not connecting Make sure Socket Mode is enabled in your Slack App settings. Go to Settings → Socket Mode and verify it is turned on. Both the App Token (xapp-) and Bot Token (xoxb-) are required.
Messages arrive but bot does not reply in channels
By default, the bot only responds to @mentions in channels. If you want it to respond to all messages, ask your assistant to disable the mention requirement for that channel.
DMs are ignored
Verify that App Home → Messages Tab is enabled in your Slack app settings. Without this, Slack will not deliver DMs to the bot.