Channels

Slack

The Slack channel integrates Open Astra agents into your Slack workspace. Agents respond to direct messages, app mentions, and slash commands. Responses use Slack's Block Kit for rich formatting.

Setup

  1. Go to api.slack.com/apps and create a new app
  2. Under OAuth and Permissions, add the required bot scopes (see below) and install the app to your workspace
  3. Copy the Bot User OAuth Token (xoxb-...)
  4. Under Basic Information, copy the Signing Secret
  5. Configure the Request URL for events and slash commands to point to your Astra gateway: https://your-domain/channels/slack
  6. Add to your environment:
bash
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_SIGNING_SECRET=your-signing-secret

Required OAuth scopes

ScopeRequired for
chat:writeSending messages
app_mentions:readResponding to @mentions
im:historyReading direct message history
im:writeSending direct messages
files:readAccessing files sent by users
commandsResponding to slash commands

Configuration in astra.yml

yaml
channels:
  slack:
    enabled: true
    defaultAgent: team-agent
    allowedChannelIds: []       # Empty means all channels
    mentionOnly: true           # Only respond when @mentioned in channels

Features

  • Block Kit — structured responses use Slack's Block Kit layout for tables, sections, and buttons
  • Thread replies — agent responses are sent as thread replies to keep channels clean
  • Slash commands — all shared commands are registered as Slack slash commands
  • File context — files shared in the same message are provided to the agent
  • Signature verification — all incoming webhooks are verified using the Slack signing secret
Slack requires your gateway to have a publicly accessible HTTPS URL for the webhook endpoint. In development, use a tunnel like ngrok: ngrok http 3000.