Slack Bot Setup
The Outpost Slack bot uses @slack/bolt to monitor Slack Connect channels,
automatically create support tickets, and deliver AI-powered responses directly in your
Slack workspace.
Overview
The Slack integration connects to your workspace via Socket Mode, listening for messages in designated Slack Connect channels shared with customers. When a customer posts a message, the bot triages it with AI, searches the knowledge base, and responds in-thread — all while creating and tracking tickets in the Outpost dashboard.
Create a Slack App
- Go to api.slack.com/apps and click Create New App
- Choose From scratch and give it a name (e.g., "Outpost Support")
- Select the workspace where you want to install it
- Go to OAuth & Permissions and add the required bot token scopes (see below)
- Install the app to your workspace and copy the Bot User OAuth Token — this is
SLACK_BOT_TOKEN - Go to Basic Information and copy the Signing Secret — this is
SLACK_SIGNING_SECRET - Enable Socket Mode under Settings, generate an app-level token with
connections:writescope — this isSLACK_APP_TOKEN
Required Bot Token Scopes
Add these scopes under OAuth & Permissions → Bot Token Scopes:
- channels:history — read messages in public channels
- channels:read — view basic channel info
- chat:write — send messages as the bot
- commands — register and handle slash commands
- groups:history — read messages in private channels
- groups:read — view basic info about private channels
- im:history — read direct messages
- users:read — view user profiles for team member detection
Environment Variables
Add these to your .env file:
# Slack Bot
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-level-token
SLACK_SIGNING_SECRET=your-signing-secret
# Team member detection (comma-separated Slack user IDs)
# Messages from these users won't trigger AI responses.
# Find IDs: click a user's profile in Slack → ⋯ → Copy member ID
TEAM_MEMBER_IDS=U01ABC123,U02DEF456,U03GHI789
Socket Mode: The bot uses Socket Mode (SLACK_APP_TOKEN)
rather than HTTP webhooks, so you don't need a publicly accessible URL during development.
Messages are received over a WebSocket connection.
Features
Message Monitoring
The bot listens for new messages in configured Slack Connect channels. When a customer posts a message, Outpost automatically:
- Detects whether the author is a team member or external customer (via
TEAM_MEMBER_IDS) - Runs AI triage to classify priority and category
- Searches the knowledge base for relevant answers
- Posts an AI-generated response in the message thread
- Creates a ticket in the Outpost dashboard linked to the Slack thread
Thread Tracking
Once a thread is linked to a ticket, subsequent replies are tracked and synced to the Outpost dashboard. Team member replies update the ticket status, and customer follow-ups are appended to the conversation history.
AI Responses
The bot delivers AI-powered responses using Block Kit formatting for rich, structured messages. Responses include action buttons that let customers indicate whether the answer was helpful.
Slash Commands
Register these slash commands in your Slack app configuration:
| Command | Description |
|---|---|
| /outpost-assign | Assign the current thread's ticket to a team member |
| /outpost-close | Close the ticket associated with the current thread |
| /outpost-escalate | Escalate the ticket to a higher priority or different team |
| /outpost-priority | Set or change the priority level of the current ticket |
Action Buttons (Block Kit)
AI responses include interactive Block Kit buttons that customers can click to provide feedback:
- "Issue Solved" — marks the ticket as resolved and archives the thread
- "Need more help" — escalates the ticket and notifies the assigned team member
To receive these interactions, enable Interactivity in your Slack app settings. With Socket Mode enabled, interactions are delivered over the same WebSocket connection.
Team Member Detection
The TEAM_MEMBER_IDS environment variable contains a comma-separated list of
Slack user IDs that belong to your support team. The bot uses this list to:
- Skip AI triage for messages from team members
- Track team member responses as internal replies on the ticket
- Calculate response time metrics (first reply from a team member)
Finding user IDs: Click a user's profile in Slack, then click the three-dot menu and select Copy member ID.
Health Check Endpoint
The Slack bot exposes a health check endpoint that reports connection status:
GET /health/slack
# Response
{ "status": "ok", "connected": true, "workspace": "your-workspace" }