Skip to main content
Use the Slack Connector to ingest messages from Slack channels into the mAItion knowledge base.

What It Does

  • fetches messages from one or more Slack channels
  • indexes each message and each thread reply as a separate document in the vector store
  • resolves channels directly by ID or dynamically via name patterns or regex
  • optionally restricts ingestion to a date range
  • attaches channel name and resolved username as metadata on each indexed message
  • skips system/bot messages (channel joins/leaves, file shares, thread broadcasts) — only actual message content is ingested
  • runs ingestion on configurable schedules

Authentication

Authentication requires a Slack bot token (xoxb-...) with the following scopes:
  • channels:history
  • groups:history
  • channels:read
  • groups:read
  • users:read
Invite the bot to each target channel (/invite @YourBot) — the bot can only read channels it has been added to.

Required Environment Variables

Set these in .env.rag:
  • SLACK1_TOKEN: Slack bot token (xoxb-...)
  • SLACK1_CHANNEL_IDS: comma-separated channel IDs (mutually exclusive with SLACK1_CHANNEL_PATTERNS)
  • SLACK1_CHANNEL_PATTERNS: comma-separated channel name patterns or regex (mutually exclusive with SLACK1_CHANNEL_IDS)
  • SLACK1_SCHEDULES: ingestion interval in seconds (default: 3600)

config.yaml Example

Configuration Reference

Multiple Slack Sources

Add more sources entries (slack2, slack3, etc) with separate env vars per source.