Skip to content

Slack

Slack integration uses Socket Mode, which means Talon opens a persistent WebSocket connection to Slack rather than requiring a publicly accessible webhook URL. This makes setup much easier for local or home-server deployments.

You will end up with two tokens: an app-level token (prefixed xapp-) for the Socket Mode connection, and a bot token (prefixed xoxb-) for sending messages.

Go to api.slack.com/apps and click Create New App.

Choose From scratch, give your app a name, and select the workspace you want to install it in.

2. Enable Socket Mode and Get the App Token

Section titled “2. Enable Socket Mode and Get the App Token”

In the left sidebar, click Socket Mode and toggle it on.

You will be prompted to generate an app-level token. Give the token a name (e.g. talon-socket) and click Generate. Copy the token — it starts with xapp-.

In the left sidebar, click OAuth & Permissions.

Scroll to Bot Token Scopes and add the following scopes:

ScopePurpose
chat:writeSend messages
channels:historyRead messages in public channels
groups:historyRead messages in private channels
im:historyRead direct messages
mpim:historyRead group direct messages
channels:readList channels
im:readList direct message conversations

In the left sidebar, click Event Subscriptions and toggle Enable Events on.

Under Subscribe to bot events, add:

  • message.channels
  • message.groups
  • message.im
  • message.mpim

Click Save Changes.

In the left sidebar, click OAuth & Permissions and click Install to Workspace.

After authorizing, copy the Bot User OAuth Token — it starts with xoxb-.

{
"channels": {
"slack": {
"accounts": {
"my-workspace": {
"bot_token": "xoxb-...",
"app_token": "xapp-..."
}
}
}
}
}

Restart Talon. The bot will appear online in your Slack workspace and respond to direct messages and any channel it has been invited to.

FieldRequiredDescription
bot_tokenYesBot User OAuth Token, starts with xoxb-
app_tokenYesApp-level token for Socket Mode, starts with xapp-
allow_fromNoList of Slack user IDs allowed to message the bot
modelNoOverride the default AI model for this account

Slack user IDs can be found by clicking on a user’s profile in Slack, clicking the three-dot menu, and selecting Copy member ID.

{
"channels": {
"slack": {
"accounts": {
"my-workspace": {
"bot_token": "xoxb-...",
"app_token": "xapp-...",
"allow_from": ["U01234ABCDE"]
}
}
}
}
}

Each Slack workspace requires its own app installation and tokens. Add an entry under accounts for each workspace:

{
"channels": {
"slack": {
"accounts": {
"engineering": {
"bot_token": "xoxb-111...",
"app_token": "xapp-111..."
},
"personal": {
"bot_token": "xoxb-222...",
"app_token": "xapp-222..."
}
}
}
}
}