Sophon Docs
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.

  1. Go to Slack API > Your Apps
  2. Click Create New App > From an app manifest
  3. Select your workspace
  4. 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
  }
}
  1. Click Next, review the permissions summary, then click Create
  2. Click Install to Workspace and authorize

2. Get the App-Level Token

  1. In your app settings, go to Basic Information
  2. Scroll to App-Level Tokens
  3. Click Generate Token and Scopes
  4. Name it (e.g., "sophon-socket") and add the connections:write scope
  5. Click Generate and copy the token (starts with xapp-)

3. Get the Bot Token

  1. Go to OAuth & Permissions
  2. Copy the Bot User OAuth Token (starts with xoxb-)

4. Configure in Sophon Dashboard

  1. Go to Channels and click Add Channel
  2. Select Slack
  3. Paste the App-Level Token (xapp-...)
  4. Paste the Bot User OAuth Token (xoxb-...)
  5. Click Test Connection
  6. Click Activate

5. Test It

Send a DM to the Sophon bot in Slack or mention it in a channel with @Sophon.

Configuration Reference

FieldTypeRequiredDescription
appTokensecretYesApp-Level Token for Socket Mode (starts with xapp-)
botTokensecretYesBot User OAuth Token (starts with xoxb-)

Bot Scopes Reference

ScopePurpose
channels:historyRead messages in public channels
channels:readView public channel info
channels:manageManage public channels
chat:writeSend messages
groups:historyRead messages in private channels
groups:readView private channel info
im:historyRead direct messages
im:readView DM info
im:writeStart DMs
mpim:historyRead group DMs
mpim:readView group DM info
files:readDownload shared files
files:writeUpload files
users:readView user profiles
users:read.emailView user email addresses
reactions:readRead reactions
reactions:writeAdd reactions
pins:readView pinned messages
pins:writePin/unpin messages
reminders:readView reminders
reminders:writeCreate reminders

Subscribed Events

EventDescription
message.channelsMessage in a public channel
message.groupsMessage in a private channel
message.imDirect message
message.mpimGroup direct message
reaction_added / reaction_removedReaction changes
pin_added / pin_removedPin changes
member_joined_channel / member_left_channelMembership changes
channel_renameChannel 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 with xoxb-. Regenerate if needed.
  • Bot doesn't respond in channels — The bot must be invited to the channel first (/invite @Sophon). With groupBehavior: "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_enabled is true in your app settings. Also verify the App-Level Token has the connections:write scope.
  • Files not downloading — The bot needs the files:read scope. Verify it's included and reinstall the app if you added it after initial install.