Connect Slack Bot
How to configure and connect a Slack bot to Buda via Socket Mode (WebSocket) for two-way AI conversations.
Connect Slack Bot
Buda connects to Slack via Socket Mode — a persistent WebSocket connection. This means you do not need a public HTTPS endpoint or any webhook URL configuration. You only need two tokens, and Buda will automatically maintain the connection in the background.
Step 1: Create a Slack App
- Go to https://api.slack.com/apps and click Create New App.
- Select From scratch, enter an app name (e.g., Buda Assistant), and choose your workspace.
- Click Create App.
Step 2: Enable Socket Mode and Get the App-Level Token
- In the left menu, click Socket Mode.
- Toggle on Enable Socket Mode.
- A dialog will appear asking you to create an App-Level Token:
- Enter a token name (e.g.,
buda-socket). - Click Add Scope and select
connections:write. - Click Generate.
- Enter a token name (e.g.,
- Copy the generated token — it starts with
xapp-. This is your App-Level Token.
Step 3: Configure Bot Permissions
- In the left menu, go to OAuth & Permissions.
- Under Bot Token Scopes, click Add an OAuth Scope and add the following:
app_mentions:read— receive @mention events in channelschannels:history— read channel message historychat:write— send messagesim:history— read direct message historyim:read— access DM channel infoim:write— open DM conversationsusers:read— look up user display names
Step 4: Subscribe to Events
- In the left menu, click Event Subscriptions.
- Toggle on Enable Events.
- Under Subscribe to bot events, click Add Bot User Event and add:
app_mention— triggers when a user @mentions the bot in a channelmessage.im— triggers when a user sends the bot a direct message
Step 5: Install the App to Your Workspace
- In the left menu, go to OAuth & Permissions.
- Click Install to Workspace and authorize the app.
- Copy the Bot User OAuth Token — it starts with
xoxb-. This is your Bot Token.
Step 6: Configure the Channel in Buda
- Open Channels Settings in Buda (Settings → Channels).
- Click Add Channel and select Slack.
- Fill in the two fields:
- Bot User OAuth Token: paste your
xoxb-...token - App-Level Token: paste your
xapp-...token
- Bot User OAuth Token: paste your
- Optionally set a Label and select a Target Agent.
- Click Connect.
Once saved, Buda will immediately establish a Socket Mode WebSocket connection to Slack in the background.
Step 7: Start Chatting
- In a channel: invite the bot first with
/invite @YourBotName, then@mentionit with your message. - Direct message: open a DM with the bot and send any message — no @mention needed.
Buda's AI Agent will process your message in real-time and reply in the same thread.