Slack
GolemBot connects to Slack via Socket Mode — no public URL required. The bot responds to direct messages and group channel @mentions.
Prerequisites
- A Slack workspace where you have permission to install apps
- Node.js ≥ 18
Install the SDK
bash
npm install @slack/boltCreate a Slack App
- Go to api.slack.com/apps and click Create New App → From scratch.
- Under Socket Mode, enable it and generate an App-Level Token (scope:
connections:write). Copy thexapp-...token. - Under OAuth & Permissions → Bot Token Scopes, add:
chat:write— send messagesim:history— read DMschannels:history— read channel messages (for @mentions)
- Under Event Subscriptions → Subscribe to bot events, add:
message.im— DMsapp_mention— group @mentions
- Install the app to your workspace and copy the Bot Token (
xoxb-...).
Configure golem.yaml
yaml
name: my-assistant
engine: claude-code
channels:
slack:
botToken: ${SLACK_BOT_TOKEN} # xoxb-...
appToken: ${SLACK_APP_TOKEN} # xapp-...Set environment variables before running:
bash
export SLACK_BOT_TOKEN=xoxb-...
export SLACK_APP_TOKEN=xapp-...
golem gatewayHow It Works
| Chat type | Behavior |
|---|---|
| Direct message | Always responds |
Channel @mention (@YourBot message) | Strips <@BOT_ID> prefix, then responds |
| Channel message without @mention | Ignored |
Each conversation thread (DM or channel) maintains its own session context.
Message Limits
Slack messages are split at 4,000 characters per chunk if the response is longer.