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

  1. Go to api.slack.com/apps and click Create New App
  2. Choose From scratch and give it a name (e.g., "Outpost Support")
  3. Select the workspace where you want to install it
  4. Go to OAuth & Permissions and add the required bot token scopes (see below)
  5. Install the app to your workspace and copy the Bot User OAuth Token — this is SLACK_BOT_TOKEN
  6. Go to Basic Information and copy the Signing Secret — this is SLACK_SIGNING_SECRET
  7. Enable Socket Mode under Settings, generate an app-level token with connections:write scope — this is SLACK_APP_TOKEN

Required Bot Token Scopes

Add these scopes under OAuth & Permissions → Bot Token Scopes:

Environment Variables

Add these to your .env file:

.env env
# 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:

  1. Detects whether the author is a team member or external customer (via TEAM_MEMBER_IDS)
  2. Runs AI triage to classify priority and category
  3. Searches the knowledge base for relevant answers
  4. Posts an AI-generated response in the message thread
  5. 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:

CommandDescription
/outpost-assignAssign the current thread's ticket to a team member
/outpost-closeClose the ticket associated with the current thread
/outpost-escalateEscalate the ticket to a higher priority or different team
/outpost-prioritySet 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:

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:

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:

HTTP bash
GET /health/slack

# Response
{ "status": "ok", "connected": true, "workspace": "your-workspace" }