๐Ÿค– Slack Bot Setup Guide

March 20, 2026 ยท View on GitHub

Each lobster needs its own Slack App. Two ways to set it up:

MethodTimeBest for
Automated (recommended)~2 minTeams spawning multiple lobsters
Manual~5 minFirst-time setup or no config token

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

  1. Go to https://api.slack.com/apps
  2. Scroll down to "Your App Configuration Tokens"
  3. Click "Generate Token" for your workspace
  4. 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

  1. Go to https://api.slack.com/apps โ†’ "Create New App" โ†’ "From scratch"
  2. App Name: lobster-<name> (e.g., lobster-alice)
  3. Workspace: Select yours โ†’ "Create App"

Step 2: Enable Socket Mode

  1. Left sidebar โ†’ "Socket Mode" โ†’ Toggle ON
  2. Create App-Level Token: name socket, scope connections:write
  3. ๐Ÿ“‹ 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

  1. Left sidebar โ†’ "Install App" โ†’ "Install to Workspace" โ†’ Allow
  2. ๐Ÿ“‹ 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

ProblemFix
Bot doesn't respond to DMsCheck Socket Mode is ON, im:history + message.im events added
"not_authed" errorDouble-check xoxb-... token; try reinstalling the app
Bot works in channels but not DMsOwner needs to DM the bot first (pairing mode)
Permission errorsAdd missing scopes โ†’ reinstall the app

Check logs: docker logs lobster-alice --tail 50