Channels
Slack
Connect Sophon to your Slack workspace via Socket Mode.
Sophon connects to Slack using Socket Mode, which means no public URL or webhook configuration is needed. You'll create a Slack App, configure its permissions, and paste two tokens into Sophon.
Prerequisites
- A Slack workspace where you have admin or app-install permissions
- Access to the Slack API portal
Step-by-Step Setup
1. Create a Slack App from Manifest
The fastest way to set up the Slack app is using Sophon's app manifest.
- Go to Slack API > Your Apps
- Click Create New App > From an app manifest
- Select your workspace
- Choose JSON format and paste the following manifest:
{
"display_information": {
"name": "Sophon",
"description": "Sophon AI Personal Assistant — your intelligent operating system for digital life",
"background_color": "#4f46e5",
"long_description": "Sophon is an enterprise-grade AI Personal Assistant that connects to your Slack workspace for real-time messaging, message search, channel management, reactions, pins, reminders, and more. Sophon listens via Socket Mode and responds intelligently using your configured LLM provider."
},
"features": {
"app_home": {
"home_tab_enabled": false,
"messages_tab_enabled": true,
"messages_tab_read_only_enabled": false
},
"bot_user": {
"display_name": "Sophon",
"always_online": true
}
},
"oauth_config": {
"scopes": {
"bot": [
"channels:history",
"channels:read",
"channels:manage",
"chat:write",
"groups:history",
"groups:read",
"im:history",
"im:read",
"im:write",
"mpim:history",
"mpim:read",
"files:read",
"files:write",
"users:read",
"users:read.email",
"reactions:read",
"reactions:write",
"pins:read",
"pins:write",
"reminders:read",
"reminders:write"
]
}
},
"settings": {
"event_subscriptions": {
"bot_events": [
"message.channels",
"message.groups",
"message.im",
"message.mpim",
"reaction_added",
"reaction_removed",
"pin_added",
"pin_removed",
"member_joined_channel",
"member_left_channel",
"channel_rename"
]
},
"interactivity": {
"is_enabled": false
},
"org_deploy_enabled": false,
"socket_mode_enabled": true,
"token_rotation_enabled": false
}
}- Click Next, review the permissions summary, then click Create
- Click Install to Workspace and authorize
2. Get the App-Level Token
- In your app settings, go to Basic Information
- Scroll to App-Level Tokens
- Click Generate Token and Scopes
- Name it (e.g., "sophon-socket") and add the
connections:writescope - Click Generate and copy the token (starts with
xapp-)
3. Get the Bot Token
- Go to OAuth & Permissions
- Copy the Bot User OAuth Token (starts with
xoxb-)
4. Configure in Sophon Dashboard
- Go to Channels and click Add Channel
- Select Slack
- Paste the App-Level Token (
xapp-...) - Paste the Bot User OAuth Token (
xoxb-...) - Click Test Connection
- Click Activate
5. Test It
Send a DM to the Sophon bot in Slack or mention it in a channel with @Sophon.
Configuration Reference
| Field | Type | Required | Description |
|---|---|---|---|
appToken | secret | Yes | App-Level Token for Socket Mode (starts with xapp-) |
botToken | secret | Yes | Bot User OAuth Token (starts with xoxb-) |
Bot Scopes Reference
| Scope | Purpose |
|---|---|
channels:history | Read messages in public channels |
channels:read | View public channel info |
channels:manage | Manage public channels |
chat:write | Send messages |
groups:history | Read messages in private channels |
groups:read | View private channel info |
im:history | Read direct messages |
im:read | View DM info |
im:write | Start DMs |
mpim:history | Read group DMs |
mpim:read | View group DM info |
files:read | Download shared files |
files:write | Upload files |
users:read | View user profiles |
users:read.email | View user email addresses |
reactions:read | Read reactions |
reactions:write | Add reactions |
pins:read | View pinned messages |
pins:write | Pin/unpin messages |
reminders:read | View reminders |
reminders:write | Create reminders |
Subscribed Events
| Event | Description |
|---|---|
message.channels | Message in a public channel |
message.groups | Message in a private channel |
message.im | Direct message |
message.mpim | Group direct message |
reaction_added / reaction_removed | Reaction changes |
pin_added / pin_removed | Pin changes |
member_joined_channel / member_left_channel | Membership changes |
channel_rename | Channel renamed |
channels.json Example
{
"id": "slack-workspace",
"type": "slack",
"name": "Sophon Slack Bot",
"enabled": true,
"config": {
"appToken": "<encrypted>",
"botToken": "<encrypted>"
},
"routing": {
"agentId": "default",
"dmBehavior": "main-session",
"groupBehavior": "mention-only"
},
"status": "connected"
}Troubleshooting
- "invalid_auth" error — One or both tokens are wrong. Verify the App-Level Token starts with
xapp-and the Bot Token starts withxoxb-. Regenerate if needed. - Bot doesn't respond in channels — The bot must be invited to the channel first (
/invite @Sophon). WithgroupBehavior: "mention-only", it only responds when mentioned. - "missing_scope" error — The app is missing a required OAuth scope. Go to OAuth & Permissions, add the missing scope, and reinstall the app to the workspace.
- Socket Mode disconnects — Check that
socket_mode_enabledistruein your app settings. Also verify the App-Level Token has theconnections:writescope. - Files not downloading — The bot needs the
files:readscope. Verify it's included and reinstall the app if you added it after initial install.