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

# Slack Bot

> Datafold Assistant — a conversational Slack bot that answers questions about your data using Datafold's MCP tools, scoped via a service account.

The **Datafold Assistant** brings Datafold's data context into Slack. Mention `@Datafold` in a thread (or DM it directly) to ask about your data sources, lineage, monitors, diffs, and anything else exposed through Datafold's MCP tools — without leaving the conversation.

<Note>
  Some features (such as lineage) require the **Knowledge Graph** feature to be enabled for your organization. Contact [support@datafold.com](mailto:support@datafold.com) if you're interested.
</Note>

## What you can ask

The Assistant answers natural-language questions using the same [MCP tool surface](/datafold-mcp) as clients like Claude Code or Cursor. Typical questions in practice:

* "What does the `orders` table look like?" — schema, recent activity, downstream dependencies.
* "Show me the latest data diff for our staging dbt model and summarize the differences."
* "Which monitors fired this week, and which datasets do they cover?"
* "Find the Snowflake table that this Looker dashboard depends on."
* "Summarize the column-level lineage for `customers.email`."

The set of available tools evolves as new MCP capabilities ship. The operating model stays the same: the Assistant uses whatever your bound [service account](/security/service-accounts) has permission to use, nothing more.

You can also drop screenshots and small text files into the thread — the Assistant reads images and small UTF-8 text inline and uses them as context for its answer.

## Permissions model

The bot does **not** have its own catalog of permissions. It acts under the identity of a Datafold **service account** that you bind to the workspace at install time, and inherits exactly that account's access — to data sources, monitors, lineage, and the MCP tools governed by [tool permissions](/security/mcp-tool-permissions).

The intended way to scope the bot is therefore at the Datafold-permissions layer:

1. Create (or choose) a [**custom group**](/security/user-roles-and-permissions#custom-groups) with the MCP tool permissions you want the bot to use.
2. Create a [**service account**](/security/service-accounts) in that group.
3. Bind the service account to the Slack workspace during install.

To restrict the bot, narrow the service account's group. To expand its reach, add more permissions to the group or rebind to a different service account — re-binding rotates the bot's API key automatically, with no exposure window.

<Note>
  The Slack OAuth scopes the bot itself requests (read mentions, post messages, read attached files, etc.) only govern what the bot can do **inside Slack**. They are independent of Datafold permissions.
</Note>

## Installation

<Note>
  **PREREQUISITES**

  * Datafold **Admin** role
  * Slack workspace **admin** access (or permission to install apps)
  * A Datafold **service account** in a permission group of your choosing. You'll bind it during install — it's cleanest to set up the [custom group](/security/user-roles-and-permissions#custom-groups) and [service account](/security/service-accounts) first.
</Note>

<Note>
  If **Settings → Integrations → Agents** is not available on your Datafold organization, reach out to the Datafold support team to enable it.
</Note>

<Steps>
  <Step title="Install into your Slack workspace">
    In Datafold, go to **Settings → Integrations → Agents → Slack Bot** and click **Install to Slack**. Slack will prompt you to choose a workspace and authorize the app's scopes. After approval, you'll be redirected back to Datafold.
  </Step>

  <Step title="Bind a service account">
    Pick the service account whose permissions the bot should inherit and click **Save**. Datafold issues a fresh API key for the bot at this point — it is stored encrypted and never displayed.

    <Tip>
      Re-binding rotates the API key. You can switch the bot to a different service account at any time without exposure.
    </Tip>
  </Step>

  <Step title="Try it">
    In Slack, invite `@Datafold` to a channel and mention it (or open a DM). Ask a question about your data and the bot will reply in-thread.
  </Step>
</Steps>

## Slack notifications

Installing the Assistant also provisions a **Slack notification destination** for the same workspace, so monitor alerts can be routed through this install without setting up Slack notifications separately. The new destination appears under **Settings → Integrations → Notifications** and is available immediately when configuring a monitor.

<Note>
  If you installed the Datafold Assistant before this capability shipped, re-install it from **Settings → Integrations → Agents → Slack Bot** to pick up the additional Slack scopes the notification path needs. The destination is created automatically on re-auth.
</Note>

If a dedicated Slack integration is also configured under **Settings → Integrations → Notifications** for the same workspace, that one takes precedence and is used for monitor notifications instead of the Assistant-provisioned destination.

Disconnecting the Assistant from **Agents** also removes its auto-provisioned notification destination. A dedicated Slack notifications integration configured under **Notifications** is not affected.

## Saving context with 💾

<Note>
  Saving context requires the **Knowledge Graph** feature to be enabled for your organization. Reactions on workspaces in organizations without it are ignored.
</Note>

Any message in a connected workspace can be added to Datafold's knowledge graph by reacting with `:floppy_disk:` (💾). The Assistant:

1. Saves the message text as a `Document` in the knowledge graph.
2. Extracts and links references to data sources, tables, and columns mentioned in the text.
3. Confirms with a ✅ reaction.

Saved Documents surface in future Assistant answers and anywhere else Datafold reads from the knowledge graph — useful for capturing tribal knowledge, ownership notes, deprecation announcements, or business context that isn't already in your warehouse metadata.

## Managing the integration

Each Slack workspace bound to your Datafold organization shows up under **Settings → Integrations → Agents → Slack Bot**. From there you can:

* **Re-bind** the service account if you want to change the bot's permission scope.
* **Disconnect** the workspace. Datafold will revoke the API key the bot was using and call Slack's `auth.revoke` so the bot token stops working on Slack's side as well. The bot stops responding immediately.

A single Datafold organization can install the Assistant into multiple Slack workspaces, each with its own service account binding. This is useful when, for example, the engineering and analytics workspaces should have different permission scopes.

## Limits and trust boundaries

* **Conversation memory.** The Assistant re-reads the most recent thread messages on every turn (capped at \~15 messages / 20,000 characters). Very long threads may not retain all earlier context — start a new thread for unrelated questions.
* **File attachments.** Images (PNG, JPEG, GIF, WebP) and small UTF-8 text files are read inline. Per-file caps: 4 MB for images, 64 KB for text. Per-turn caps: 24 MB total images, 256 KB total text. Other file types are skipped with a note in the reply.
* **Untrusted content.** The Assistant treats attachment content, prior thread messages, and saved Documents as **data**, not instructions. It will not follow embedded instructions to bypass its rules, reveal credentials, or take actions the user didn't ask for.
