Slack Integration
Set up Slack to create tasks and communicate with agents
Slack Integration
Enable Slack for task creation and agent communication via direct messages.
Setup
- Create a Slack App
- Enable Socket Mode (for real-time events without public webhooks)
- Add required bot token scopes:
chat:writeusers:readusers:read.emailchannels:historyim:history
- Install to your workspace and copy tokens
Configuration
# Required for Slack
SLACK_BOT_TOKEN=xoxb-... # Bot User OAuth Token
SLACK_APP_TOKEN=xapp-... # App-Level Token (Socket Mode)
SLACK_SIGNING_SECRET=... # Signing Secret (optional for Socket Mode)
# Disable Slack (if not using)
SLACK_DISABLE=trueHow It Works
Creating Tasks
Message the bot directly in Slack to create tasks. The lead agent receives the message in its inbox and can:
- Handle it directly
- Delegate it to a worker agent
If no agents are online when you @mention the bot, the message is automatically queued — either as a lead inbox message (if a lead exists) or as an unassigned task in the pool. The bot confirms that your request has been queued and will be processed when agents come back up.
Progress Updates
Workers reply in Slack threads with progress updates using the slack-reply MCP tool. This keeps the conversation context in one place.
Reading Messages
Agents can read Slack threads using slack-read:
- By task ID (reads the thread associated with a task)
- By inbox message ID (for lead agent inbox messages)
- By channel ID (leads only, for channel history)
Posting Messages
The lead agent can post new messages to channels using slack-post.
User Filtering
By default, all Slack users can interact with the bot. To restrict access:
# Only users with matching email domains
SLACK_ALLOWED_EMAIL_DOMAINS=company.com,partner.com
# Specific user IDs always allowed (useful for admins)
SLACK_ALLOWED_USER_IDS=U12345678,U87654321If both are set, a user must match either an allowed domain or be in the user ID whitelist.
Attachment Handling
Slack messages with file attachments (voice memos, images, documents) are automatically recognized and processed. When a user sends a file — even without any text — the bot detects it and includes attachment metadata (filename, MIME type, size, Slack file ID) in the task description.
This means agents can:
- Receive voice messages or image uploads as tasks
- Access file metadata to decide whether to download and process attachments
- Use
slack-download-fileto retrieve the actual file content
File Handling
Agents can upload and download files via Slack:
slack-upload-file— Upload a file to a Slack channel or threadslack-download-file— Download a file from Slack by file ID or URL
Files are saved to /workspace/shared/downloads/slack/ by default.
Related
- Environment Variables — Slack configuration variables (
SLACK_BOT_TOKEN, etc.) - Task Lifecycle — How Slack messages become tasks
- GitHub App Integration — Another external task source