> ## 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, with each Slack user's own Datafold permissions or a bound service account's.

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, monitors, diffs, and anything else exposed through Datafold's MCP tools — without leaving the conversation.

> [!NOTE]
>
> The Assistant needs an [LLM provider](https://docs.datafold.com/integrations/llm-providers.md) configured for your organization. Until one is set up, it does not answer.

## What you can ask

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

* "What does the `orders` table look like?"
* "Show me the latest data diff for our staging model and summarize the differences."
* "Which diff monitors are in an alert state, and which datasets do they compare?"
* "Compare `analytics.orders` in Snowflake with `main.orders` in Databricks."

The set of available tools evolves as new MCP capabilities ship. The operating model stays the same: the Assistant uses only the tools the identity it acts as has permission to use (see [Permissions model](#permissions-model)).

You can also drop screenshots and small text files into the thread. The Assistant reads small UTF-8 text inline, and images when the configured model supports them, and uses them as context for its answer.

## Permissions model

The bot does **not** have its own catalog of permissions. On each message, it acts as one of two Datafold identities and inherits exactly that identity's access to data sources, monitors, and the MCP tools governed by [tool permissions](https://docs.datafold.com/security/mcp-tool-permissions.md):

* **The Slack author's own Datafold user**, when the author is a member of the workspace the bot is installed in and their Slack email is confirmed and exactly matches a Datafold user in your organization. This applies to both DMs and channel mentions. Some actions ask that user to approve them in the thread before they run.
* **The bound [service account](https://docs.datafold.com/security/service-accounts.md)**, for everyone else: Slack members without a matching Datafold user, and Slack Connect guests.

Scope the service account at the Datafold-permissions layer:

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

Narrowing the service account's group restricts what the bot can do for unmatched members. It does not restrict matched users, who always get their own permissions. To expand the bot's reach for unmatched members, 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.

## Installation

> [!NOTE]
>
> **PREREQUISITES**
>
> * Datafold **Admin** role
> * An [LLM provider](https://docs.datafold.com/integrations/llm-providers.md) configured for your organization
> * 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](https://docs.datafold.com/security/user-roles-and-permissions.md#custom-groups) and [service account](https://docs.datafold.com/security/service-accounts.md) first.
> * On dedicated and customer-hosted deployments, a super admin must first configure the Slack Assistant App (client ID, client secret, signing secret) in **Global Settings**. Until then, the install page says the app is not yet configured.

> [!NOTE]
>
> If **Settings → Integrations → Agents** is not available on your Datafold organization, reach out to the Datafold support team to enable it.

**1. 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.

**2. 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.

**3. 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.

## 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.
* **Delete integration** to 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.** In channel threads, 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.** Small UTF-8 text files are read inline, and images (PNG, JPEG, GIF, WebP) are too when the configured model supports images. 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 is instructed to treat attachment content and prior thread messages as **data**, not instructions. This is a safeguard, not a guarantee: anyone who can post in a thread can influence the Assistant's answers there, so install it only in channels whose members you trust with the permissions it acts with.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.