Org in a Box
Gateways

Slack Gateway

Connect Org in a Box to Slack using Socket Mode — no public URL required.

Prerequisites

  • A Slack workspace where you have admin rights
  • Docker Compose running

1. Create a Slack App

  1. Go to api.slack.com/appsCreate New AppFrom scratch
  2. Name it Org in a Box and select your workspace

2. Configure OAuth Scopes

Under OAuth & PermissionsBot Token Scopes, add:

channels:history    channels:read     chat:write
groups:history      groups:read       im:history
im:read             im:write          mpim:history
users:read          app_mentions:read

3. Enable Socket Mode

Under Socket Mode, toggle Enable Socket Mode on.

Generate an App-Level Token with scope connections:write. Copy the token — it starts with xapp-.

4. Subscribe to Events

Under Event SubscriptionsSubscribe to bot events, add:

message.im
message.channels
message.groups
app_mention

5. Install to Workspace

Under OAuth & PermissionsInstall to Workspace. Copy the Bot User OAuth Token (starts with xoxb-).

6. Configure Environment

SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
OPERATOR_USER_ID=<your-user-uuid>

7. Start the Gateway

docker compose --profile slack up -d

Usage

In any Slack channel or DM where the bot is present:

  • DM the bot: just send a message
  • Mention in channel: @Org in a Box summarise this thread

The bot streams responses using message edits (same UX as Slack's own streaming).

Permission requests appear as interactive Block Kit buttons — click Allow or Deny inline.

Troubleshooting

SymptomCauseFix
Bot not respondingSocket not connectedCheck SLACK_APP_TOKEN starts with xapp-
"not_in_channel" errorBot not added to channel/invite @Org in a Box
Empty responsesMissing chat:write scopeRe-install app after adding scope

On this page