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

# Connect Slack

> Install the TryAgent Slack bot for DMs and channel notifications.

# Connect Slack

TryAgent reaches people and channels in Slack through a bot installed once per workspace. The bot can DM a user by Slack email and post to any channel it has been invited to.

## Create the Slack app

In TryAgent, open **Destinations -> Slack connection** and choose **Create the Slack app**. This opens Slack's create-from-manifest flow with the bot name and scopes pre-filled.

The bot token scopes are:

| Scope              | Purpose                                       |
| ------------------ | --------------------------------------------- |
| `chat:write`       | Post messages to people and channels.         |
| `channels:read`    | Resolve public channel names to IDs.          |
| `groups:read`      | Resolve private channel names to IDs.         |
| `users:read`       | Required parent scope for reading user email. |
| `users:read.email` | Find a person by Slack email for DMs.         |
| `im:write`         | Open a direct message with a person.          |

To create it manually, go to [Slack apps](https://api.slack.com/apps), create an app from scratch, and add the same bot token scopes under **OAuth & Permissions**.

## Install and connect

1. In Slack **OAuth & Permissions**, choose **Install to Workspace**.
2. Copy the **Bot User OAuth Token**. It starts with `xoxb-`.
3. In TryAgent **Destinations -> Slack connection**, paste the token and choose **Connect**.

TryAgent verifies the token with Slack and stores it encrypted for the workspace. Only owners and admins can connect Slack.

## Use Slack destinations

* For DMs, add a **Slack DM** contact method on the People page using the person's Slack email.
* For channels, invite the bot in Slack with `/invite @TryAgent`, then add a Slack destination with the channel name or ID.

## Troubleshooting

* `Slack is not connected for this workspace`: finish the connection step.
* `No Slack user found`: confirm the email belongs to the Slack workspace and `users:read.email` is installed.
* `not_in_channel`: invite the bot to the channel.
* `invalid_auth`: reconnect with a valid `xoxb-` bot token.
