๐ค Slack Bot Setup Guide
March 20, 2026 ยท View on GitHub
Each lobster needs its own Slack App. Two ways to set it up:
| Method | Time | Best for |
|---|---|---|
| Automated (recommended) | ~2 min | Teams spawning multiple lobsters |
| Manual | ~5 min | First-time setup or no config token |
Method 1: Automated Setup (Recommended)
The create-slack-app.sh script creates a fully configured Slack App via the Manifest API โ all scopes, events, and socket mode pre-configured. No manual clicking.
One-time prerequisite: Get a Configuration Token
- Go to https://api.slack.com/apps
- Scroll down to "Your App Configuration Tokens"
- Click "Generate Token" for your workspace
- Save both tokens:
cat > .slack-config-tokens.json << 'TOKEOF'
{
"config_token": "xoxe.xoxp-...",
"refresh_token": "xoxe-..."
}
TOKEOF
chmod 600 .slack-config-tokens.json
Create & spawn
# 1. Create the Slack app (auto-configures everything)
./scripts/create-slack-app.sh alice
# 2. The script outputs an install link โ click "Allow" in your browser
# 3. Copy the two tokens from the links the script prints:
# - Bot Token (xoxb-...): from OAuth page
# - App Token (xapp-...): create one at General โ App-Level Tokens
# (name: "socket", scope: connections:write)
# 4. Spawn the lobster
./scripts/spawn-lobster.sh alice U0XXXXXXXXX xoxb-... xapp-...
That's it. The gateway starts in about 90 seconds, then DM the bot in Slack.
Even easier: Tell your controller "spawn lobster alice for @username" and it runs these steps for you. You just click Allow and paste the app token.
Method 2: Manual Setup
If you don't have a Configuration Token, or prefer manual control.
Step 1: Create a Slack App
- Go to https://api.slack.com/apps โ "Create New App" โ "From scratch"
- App Name:
lobster-<name>(e.g.,lobster-alice) - Workspace: Select yours โ "Create App"
Step 2: Enable Socket Mode
- Left sidebar โ "Socket Mode" โ Toggle ON
- Create App-Level Token: name
socket, scopeconnections:write - ๐ Save the
xapp-...token
Step 3: Bot Permissions
Left sidebar โ "OAuth & Permissions" โ "Bot Token Scopes" โ Add:
app_mentions:read channels:history channels:read
chat:write files:read files:write
groups:history groups:read im:history
im:read im:write mpim:history
mpim:read reactions:read reactions:write
users:read
Step 4: Events
Left sidebar โ "Event Subscriptions" โ Toggle ON โ Subscribe to bot events:
app_mention message.channels message.groups
message.im message.mpim
Save Changes.
Step 5: Install & Get Tokens
- Left sidebar โ "Install App" โ "Install to Workspace" โ Allow
- ๐ Save the
xoxb-...token
Step 6: Get Owner's Slack ID
In Slack: click person's name โ View full profile โ โฎ โ Copy member ID โ U0XXXXXXXXX
Step 7: Spawn
./scripts/spawn-lobster.sh alice U0XXXXXXXXX xoxb-... xapp-...
๐ง Troubleshooting
| Problem | Fix |
|---|---|
| Bot doesn't respond to DMs | Check Socket Mode is ON, im:history + message.im events added |
| "not_authed" error | Double-check xoxb-... token; try reinstalling the app |
| Bot works in channels but not DMs | Owner needs to DM the bot first (pairing mode) |
| Permission errors | Add missing scopes โ reinstall the app |
Check logs: docker logs lobster-alice --tail 50