> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gurubase.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack Data Ingestion

> Import Slack channel history as knowledge sources

Turn your Slack conversations into AI knowledge. Import support threads, engineering discussions, and decision logs so your Guru can answer questions based on real team conversations.

## Why Ingest Slack Data?

<CardGroup cols={2}>
  <Card title="Capture Tribal Knowledge" icon="comments">
    Answers buried in Slack threads become searchable knowledge
  </Card>

  <Card title="Trusted User Filtering" icon="user-check">
    Only index threads answered by experts or senior team members
  </Card>

  <Card title="Keyword Filtering" icon="filter">
    Include or exclude threads based on specific words
  </Card>

  <Card title="Auto-Sync" icon="rotate">
    Backfill jobs automatically import new conversations on a schedule
  </Card>
</CardGroup>

## What Gets Indexed

| Content Type   | What's Included                                    |
| -------------- | -------------------------------------------------- |
| **Threads**    | Full thread conversations with all replies         |
| **Messages**   | Message content from selected channels             |
| **Files**      | Files shared in channels (images, documents, etc.) |
| **Time Range** | Filter by date range (custom or predefined)        |
| **Filtering**  | Include/exclude by keywords or trusted users       |

***

## Setup

### Step 1: Create a Slack App

<Steps>
  <Step title="Create New App">
    1. Go to [Slack API Apps](https://api.slack.com/apps) and click **Create New App**
    2. Select **From scratch**
    3. Enter a name (e.g., "Gurubase Backfill")
    4. Choose your Slack workspace
    5. Click **Create App**
  </Step>

  <Step title="Add Bot Permissions">
    Go to **OAuth & Permissions** → **Bot Token Scopes** and add:

    | Scope              | Purpose                       |
    | ------------------ | ----------------------------- |
    | `channels:history` | Read public channel messages  |
    | `groups:history`   | Read private channel messages |
    | `channels:join`    | Join public channels          |
    | `channels:read`    | Get public channel names      |
    | `groups:read`      | Get private channel names     |
    | `files:read`       | Read files shared in channels |
  </Step>

  <Step title="Install to Workspace">
    1. Go to **Install App** page
    2. Click **Install to \[Your Workspace]**
    3. Complete the OAuth flow
    4. Copy the **Bot User OAuth Token** (starts with `xoxb-`)
  </Step>
</Steps>

### Step 2: Connect to Gurubase

<Steps>
  <Step title="Navigate to Slack Integration">
    Go to **Gurubase Dashboard** → Select your Guru → **Integrations** → **Ingestions** → **Slack**
  </Step>

  <Step title="Enter Bot Token">
    Paste your Bot User OAuth Token and click **Connect**

    <Frame>
      <img src="https://mintcdn.com/gurubase/VtcaSrKf-gN2CVzi/images/ingestion/slack/slack-ingestion-before.png?fit=max&auto=format&n=VtcaSrKf-gN2CVzi&q=85&s=d0e435479f152cfeccb3fa1e9ee0fa9c" alt="Gurubase slack ingestion before installation" width="2336" height="1040" data-path="images/ingestion/slack/slack-ingestion-before.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/gurubase/VtcaSrKf-gN2CVzi/images/ingestion/slack/slack-ingestion-after.png?fit=max&auto=format&n=VtcaSrKf-gN2CVzi&q=85&s=9f5b50f271d36c902f41affaa79eec99" alt="Gurubase slack ingestion after installation" width="2332" height="998" data-path="images/ingestion/slack/slack-ingestion-after.png" />
    </Frame>
  </Step>

  <Step title="Create Backfill Job">
    Go to your Guru's **Settings** → **Add** → **Slack** to configure a backfill job

    <Frame>
      <img src="https://mintcdn.com/gurubase/VtcaSrKf-gN2CVzi/images/ingestion/slack/slack-backfill-sidebar.png?fit=max&auto=format&n=VtcaSrKf-gN2CVzi&q=85&s=90a09cffb4ed7bf8c07c93deeb68c748" alt="Gurubase slack backfill sidebar" width="2032" height="1914" data-path="images/ingestion/slack/slack-backfill-sidebar.png" />
    </Frame>
  </Step>
</Steps>

***

## Configuring a Backfill Job

| Setting              | Description                                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Channel ID**       | The Slack channel to index (see below for how to find it)                                                                                                           |
| **Time Range**       | Custom date range or predefined (last 7 days, 30 days, etc.)                                                                                                        |
| **Buffer Days**      | Number of days to skip from the end of the time range (default: 3). Avoids indexing threads still being actively discussed. Set to 0 to index everything up to now. |
| **Trusted User IDs** | Only index threads answered by these users                                                                                                                          |
| **Include Words**    | Only index threads containing these keywords                                                                                                                        |
| **Exclude Words**    | Skip threads containing these keywords                                                                                                                              |

### Public vs Private Channels

**Public channels** work out of the box. The bot automatically joins the channel when you create a backfill job.

**Private channels** require an extra step: you must manually invite the bot to the channel before creating the backfill job. In Slack, open the private channel and type:

```
/invite @YourBotName
```

Replace `@YourBotName` with the name of your Slack app (e.g., `@Gurubase Backfill`). Without this, the bot cannot access the channel's message history.

<Warning>
  Make sure your Slack app has the `groups:history` and `groups:read` scopes. These are required for reading private channel messages and metadata.
</Warning>

### Finding a Channel ID

Right-click on a channel → **View channel details** → The Channel ID is shown at the bottom of the modal.

<Frame>
  <img src="https://mintcdn.com/gurubase/VtcaSrKf-gN2CVzi/images/ingestion/slack/slack-channel-id.png?fit=max&auto=format&n=VtcaSrKf-gN2CVzi&q=85&s=251e79bd6ca91aff5e6249b982fe01ba" alt="Slack Channel ID Modal" width="300" data-path="images/ingestion/slack/slack-channel-id.png" />
</Frame>

### Finding a User ID

<Steps>
  <Step title="Open Profile">
    Open a DM with the user → Click their name → Click **View full profile**
  </Step>

  <Step title="Copy ID">
    In the profile sidebar, click the **three dots (⋮)** → **Copy member ID**
  </Step>
</Steps>

<Tip>
  Use trusted user filtering to only index threads where senior engineers or support leads provided answers — this ensures higher quality knowledge.
</Tip>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Slack Bot" icon="slack" href="/integrations/bots/slack">
    Deploy Gurubase as a Slack bot for your team
  </Card>

  <Card title="Confluence Ingestion" icon="confluence" href="/integrations/ingestion/confluence">
    Import Confluence pages
  </Card>

  <Card title="Jira Ingestion" icon="jira" href="/integrations/ingestion/jira">
    Import Jira issues
  </Card>

  <Card title="Data Sources" icon="database" href="/guides/data-sources">
    Add more knowledge sources
  </Card>
</CardGroup>
