> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.airweave.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.airweave.ai/_mcp/server.

# Slack

> Slack integration with Airweave

{/* AUTO-GENERATED CONTENT START */}

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/slack/icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T162913Z&X-Amz-Expires=604800&X-Amz-Signature=51dcc31797b598b070622cfc4038867ad07d0ac6df82e559bd32e4db28b88310&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Slack logo" width="48" height="48" />

<h1>
  Slack
</h1>

This connector enables AI agents and RAG systems to retrieve context from Slack through Airweave's unified search layer.

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

#### [View Source Code](https://github.com/airweave-ai/airweave/tree/main/backend/airweave/platform/sources/slack.py)

Explore the Slack connector implementation

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

#### SlackMessageEntity

Schema for Slack message entities from federated search.

Reference:
[https://api.slack.com/methods/search.messages](https://api.slack.com/methods/search.messages)

| Field                | Type                       | Description                                         |
| -------------------- | -------------------------- | --------------------------------------------------- |
| text                 | str                        | The text content of the message                     |
| user                 | Optional\[str]             | User ID of the message author                       |
| username             | Optional\[str]             | Username of the message author                      |
| ts                   | str                        | Message timestamp (unique identifier)               |
| channel\_id          | str                        | ID of the channel containing this message           |
| channel\_name        | Optional\[str]             | Name of the channel                                 |
| channel\_is\_private | Optional\[bool]            | Whether the channel is private                      |
| type                 | str                        | Type of the message                                 |
| permalink            | Optional\[str]             | Permalink to the message in Slack                   |
| team                 | Optional\[str]             | Team/workspace ID                                   |
| previous\_message    | Optional\[Dict\[str, Any]] | Previous message for context                        |
| next\_message        | Optional\[Dict\[str, Any]] | Next message for context                            |
| score                | Optional\[float]           | Search relevance score from Slack                   |
| iid                  | Optional\[str]             | Internal search ID                                  |
| url                  | Optional\[str]             | URL to view the message in Slack                    |
| message\_time        | datetime                   | Timestamp converted to datetime for hashing checks. |
| web\_url\_value      | Optional\[str]             | Permalink to open the message.                      |

{/* AUTO-GENERATED CONTENT END */}

---

# 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](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"

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/slack/create-app.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T162913Z&X-Amz-Expires=604800&X-Amz-Signature=e63c922aa8e5c8a8187f74644995ce2d262937d17130e097da1dee9753fb4dc3&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Create app in Slack" width="600" />

#### 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)

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/slack/user-token-scopes.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T162913Z&X-Amz-Expires=604800&X-Amz-Signature=6a1178051a165f7e65a45eeae0ef470b7ba4b8cf6beb2d1959249df0193ace4d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="User Token Scopes" width="600" />

**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-`)

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/slack/oauth2-token.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T162913Z&X-Amz-Expires=604800&X-Amz-Signature=035846d7cdb149f31fd0abd2e26609abd9097c38583e16328c802fd1a66c3640&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="OAuth2 User token in Slack" width="600" />

#### 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

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/slack/add-token-in-airweave.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T162913Z&X-Amz-Expires=604800&X-Amz-Signature=6f3f91fe51a09f4cb0e11ec57f589c150cd71e182a339a8fd882ad8ecabb121e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Add Slack token in Airweave" width="600" />

## 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