Slack connector — connect a workspace and search messages from the agent

Read-only Slack connector via bot-token OAuth. Per-channel incremental sync, deterministic permalinks, searchable from the agent via searchExternalContent.

Updated 2026-04-30

Connect a Slack workspace from `/integrations` so the Kodori agent can search messages alongside your documents. Read-only by design — the bot can only see channels it's been invited to.

## Setup

Create a Slack app at `https://api.slack.com/apps` with these settings:

- **Bot token scopes:** `channels:history`, `channels:read`, `groups:history`, `groups:read`, `users:read`, `users:read.email`, `files:read` (D232 — file attachment sync) - **Redirect URL:** `<your-kodori-domain>/api/oauth/callback/slack` - **Distribution:** install to your workspace; the bot user appears as "Kodori"

Set environment variables on your Kodori deployment:

- `SLACK_CLIENT_ID` — Client ID from the App Credentials panel - `SLACK_CLIENT_SECRET` — Client Secret from the same panel

Then click **Connect** on `/integrations` next to Slack. The OAuth flow installs the bot to your workspace; on consent, the connector lands as **connected** at `/integrations/[id]`.

## What gets synced

The bot can only read channels you invite it to. After install:

``` /invite @Kodori ```

…in any channel you want indexed. The connector pulls messages from `conversations.history` per channel; back-pressure caps are 50 channels per run, 200 messages per channel per run, with per-channel `oldest`-ts cursors so subsequent runs only pull newer messages.

## Searching synced content

The agent uses the `searchExternalContent` MCP tool to query across synced messages. Ask "search Slack for the Brennan matter" and it returns ranked hits with snippets and permalinks back to the original Slack thread.

## Permissions

Slack channels you don't invite the bot to are invisible to Kodori. There's no way for the bot to read DMs or private channels it isn't a member of.