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

# Slack

> Get test run reports in Slack channels, and mention the @Empirical bot to start an agent session from any thread

The Empirical Slack app adds the `@Empirical` bot to your workspace. The bot posts test run reports
to the channels you choose, and mentioning it starts an agent session with the thread as context.

## Install

1. Open **Settings → Reporters** for your project.
2. Click **Install** on the Slack card, and approve the app in Slack.

## Add a channel

Mention `@Empirical` in each channel you want to use. If the bot isn't in the channel yet, Slack asks
you to add it. The first mention registers the channel for your Empirical organization and starts an
agent session.

If your organization has more than one project, start the message with the project slug in square
brackets:

```text theme={null}
@Empirical [project-slug] investigate this failure
```

With one active project, the slug is optional. Registered channels are listed under
**Settings → Slack channels**.

## Send test run notifications

Registering a channel doesn't turn on run notifications. For each environment that should post:

1. Open **Settings → Environments** and edit the environment.
2. Under **Slack Notifications**, select the registered channels that should get its run updates.

Removing a channel from an environment stops that environment's notifications. The channel stays
registered for the organization.

To mention test owners when tests fail, see [Slack notifications](https://empirical.run/docs/features/slack-notifications.md).

## Permissions

The bot reads and sends messages only in channels it has been added to. The app requests these scopes:

| Scope | Why Empirical needs it |
| - | - |
| `chat:write`, `chat:write.customize` | Post test run reports and agent responses |
| `app_mentions:read` | Start agent sessions when someone mentions `@Empirical` |
| `reactions:write` | React to a message to show the agent is working |
| `channels:history`, `groups:history` | Read the thread where `@Empirical` is mentioned, in public and private channels |
| `files:read`, `files:write` | Pass images from the thread to the agent, and upload reports and screenshots |
| `links:read`, `links:write` | Show a preview card for `empirical.run` links |
| `im:history`, `im:write` | Hold direct-message conversations with the bot |
| `assistant:write` | Reply in the Slack assistant pane |
| `team:read` | Resolve the home workspace of Slack Connect users for message permalinks |
| `users:read`, `users:read.email` | Match Slack users to their Empirical account by email |


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