Slack

Slack logo

Slack

Configuration

Slack source connector using federated search.

Instead of syncing all messages and files, this source searches Slack at query time using the search.all API endpoint. This is necessary because Slack’s rate limits are too restrictive for full synchronization.

Authentication

This connector uses OAuth 2.0 authentication. You can connect through the Airweave UI or API using the OAuth flow.

Supported authentication methods:

  • OAuth Browser Flow (recommended for UI)
  • OAuth Token (for programmatic access)
  • Auth Provider (enterprise SSO)

Configuration Options

This connector does not have any additional configuration options.

Data Models

The following data models are available for this connector:

Schema for Slack message entities from federated search.

FieldTypeDescription
textstrThe text content of the message
userOptional[str]User ID of the message author
usernameOptional[str]Username of the message author
tsstrMessage timestamp (unique identifier)
channel_idstrID of the channel containing this message
channel_nameOptional[str]Name of the channel
channel_is_privateOptional[bool]Whether the channel is private
typestrType of the message
permalinkOptional[str]Permalink to the message in Slack
teamOptional[str]Team/workspace ID
previous_messageOptional[Dict[str, Any]]Previous message for context
next_messageOptional[Dict[str, Any]]Next message for context
scoreOptional[float]Search relevance score from Slack
iidOptional[str]Internal search ID
created_atOptional[datetime]When the message was created

Federated Search

Real-Time Search Without Syncing

The Slack connector uses federated search to query your Slack workspace in real-time at search time, rather than syncing all messages into Airweave’s database. This approach:

  • Avoids hitting Slack’s strict rate limits
  • Keeps your data in Slack (nothing synced to Airweave)
  • Returns fresh, up-to-date results at query time
  • Searches across all channels you have access to

When you search in Airweave, your query is automatically sent to Slack’s search API, and results are merged with data from your other connected sources.

How It Works

  1. Connect your Slack workspace using OAuth (one-time setup)
  2. Search in Airweave - your queries are automatically sent to Slack’s search API in real-time
  3. Results are merged with data from your other sources using intelligent ranking

No data is synced or stored in Airweave - everything happens at search time.

Prerequisites

  • Access to a Slack workspace where you have permissions to add apps
  • Administrator access to your Airweave instance

Setup Steps

Option A: Production Setup (OAuth Flow)

When running Airweave in production (non-localhost), simply:

  1. Navigate to your Airweave collection
  2. Click “Add Source” and select “Slack”
  3. Follow the OAuth flow to authorize Airweave
  4. That’s it! Your Slack workspace is now searchable

The OAuth flow will request the search:read user scope, which allows Airweave to search on your behalf.

Option B: Local Development Setup (Manual Token)

Slack does not allow OAuth2 flows for http://localhost, so for local development you’ll need to manually create a token.

1. Create a Slack App

  1. Go to https://api.slack.com/apps
  2. Click the “Create New App” button
  3. Choose “From scratch”
  4. Enter a name for your app (e.g., “Airweave Local Dev”)
  5. Select the workspace you want to connect
  6. Click “Create App”
Create app in Slack

2. Configure OAuth Permissions

  1. In your Slack app settings, navigate to “OAuth & Permissions” in the sidebar
  2. Scroll down to the “Scopes” section
  3. Under “User Token Scopes”, add the following scope:
    • search:read (required for federated search)
User Token Scopes

Scope Requirements

For federated search, you only need the search:read user scope. This allows Airweave to search Slack on your behalf at query time.

If you see scopes like channels:history, channels:read, users:read in older documentation, those were for the legacy sync-based approach and are no longer needed.

3. Install the App to Your Workspace

  1. Scroll back to the top of the “OAuth & Permissions” page
  2. Click the Install to Workspace button
  3. Review the permissions and click “Allow”
  4. After installation, you’ll be redirected back to the app settings
  5. Copy the “User OAuth Token” (it starts with xoxp-)
OAuth2 User token in Slack

4. Add the Token to Airweave

  1. In your Airweave application, navigate to the integrations section
  2. Select “Slack” from the available integrations
  3. Choose “Direct Token Injection”
  4. Paste the User OAuth Token you copied in the previous step
  5. Save your changes
Add Slack token in Airweave

Verification

After completing these steps, try searching in your Airweave collection. Your search query will be automatically sent to Slack, and relevant messages will appear in your search results alongside data from your other sources.

Troubleshooting

  • No Slack results appearing: Verify the token was copied correctly and hasn’t expired
  • Permission errors: Ensure you’ve added the search:read user scope to your Slack app
  • Authentication failed: Try regenerating the token in Slack and updating it in Airweave