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

# Chat With AI Agents and Approve Actions in Slack

> Install the OneCLI Slack app to message agents, approve their actions from cards in a thread, and let teammates onboard themselves with a DM.

## Overview

Slack is not an app connection. Agents never call the Slack API as a tool, and there is no Slack credential to grant. It is a **channel**: a place where people talk to agents, in the same threads they already use for everything else.

Two things live here. Agents answer in Slack, and they ask for approval there, so the person who has to decide gets the question where they already are instead of in a dashboard they would have to remember to open.

Connecting takes one click.

## What you will set up

* The OneCLI app installed in your Slack workspace
* DMs and channel mentions that reach your agents
* Approval cards and reach requests delivered in Slack

## Connect Slack

**1. Install the OneCLI app**

In OneCLI, open **Settings** > **Channels** and select **Add to Slack**.

![The Team onboarding card in OneCLI, showing a Not installed badge, an Add to Slack button, and a link to connect with an App Configuration token instead.](https://mintcdn.com/chartdbinc/7LmoueGVCazrMm3S/images/integrations/slack/onecli-add-to-slack.png?fit=max\&auto=format\&n=7LmoueGVCazrMm3S\&q=85\&s=45c152889dcdab70bdb2bad61b757cb8)

Team onboarding, on the Channels page in OneCLI.

Slack's consent page opens. If your workspace requires admin approval for new apps, the install completes on its own once an admin approves it, with nothing more to do in OneCLI.

**2. Let teammates onboard themselves**

Once installed, anyone in the workspace can DM the OneCLI app to get their own OneCLI account. No invitation, and no admin step per person.

> [!NOTE]
>
> Installing the app is an org-level action, so it needs someone who can install Slack apps in your workspace. After that, individual teammates need nothing.

## What happens in Slack

| In Slack | What it does |
| - | - |
| **DM an agent** | Talk to it directly, the same as the chat in the dashboard |
| **Mention it in a channel** | Bring an agent into a thread your team is already having |
| **Approval cards** | Approve or deny a pending action without leaving Slack |
| **Reach requests** | Decide whether an agent may answer someone new: approve, limit to workspace members, or block |
| **Mirrored replies** | An agent's answer appears in the thread it was asked in |

Who may talk to an agent is still yours to set. An agent reached by someone new raises a reach request rather than answering, and you choose each time.

## Controlling access

Slack changes where the conversation happens, not what an agent may do. Its [grants](https://onecli.sh/docs/guides/agent-access.md) and your organization [rules](https://onecli.sh/docs/guides/rules.md) apply to every message, whether it arrived from Slack or the dashboard, and anything needing approval still waits for a human.

The card is the point. An agent about to send an email or spend money asks in the channel, and whoever is there answers in a click.

To disconnect, open **Settings** > **Channels** and remove the installation. You can also remove the OneCLI app from Slack's own app management page, which revokes its workspace token.

***

## Self-hosted: use your own Slack app

> [!NOTE]
>
> Skip this section on OneCLI Cloud. The shared app is already approved and installed in one click.

A self-hosted deployment has no shared OneCLI Slack app, so it creates its own. OneCLI does the creating, and you supply one short-lived token to let it.

> [accordion] Get an App Configuration token
>
> 1. Open [api.slack.com/apps](https://api.slack.com/apps).
> 2. Select **Generate Token** and pick your workspace.
> 3. Copy the **Refresh Token**, not the Access Token.
>
> ![Slack's App Configuration Tokens table, with the Refresh Token column's Copy button highlighted next to the Access Token's identical button.](https://mintcdn.com/chartdbinc/7LmoueGVCazrMm3S/images/integrations/slack/slack-app-config-token.png?fit=max\&auto=format\&n=7LmoueGVCazrMm3S\&q=85\&s=78d13d6b4013aad7f401566b550f6beb)
>
> The two Copy buttons look identical. Check the column heading.

> [accordion] Paste it into OneCLI
>
> Open **Settings** > **Channels** and paste the token. OneCLI uses it to create the Slack app for your agents, then rotates it from then on.
>
> Paste it promptly. Each refresh token works only once, and a used or expired one has to be regenerated from the same page.

> [!NOTE]
>
> An App Configuration token can create and modify Slack apps in your workspace, so treat it like a password. It is also the only part of this setup that differs from Cloud, everything above this divider works the same way once the app exists.

## Listing your app on the Slack Marketplace

Only relevant if you run your own Slack app and want to distribute it beyond your workspace. Slack reviews every listing, and its [guidelines](https://api.slack.com/start/distributing/guidelines) ask for a few pages you have to supply yourself.

| Field | What Slack expects |
| - | - |
| **Installation landing page URL** | A public page, not behind a login, built for the Slack app. It needs an **Add to Slack** button or install instructions, an explanation of what the app does in Slack, a link to your privacy policy, and a success page after install. Not a PDF or a repo link. |
| **Privacy policy URL** | What data you collect, how it is used, how long it is kept, and how someone requests access or deletion, with an email or web form to contact. |
| **Support URL** | A public way to reach a human, with replies within two business days, and no extra account required to ask. |
| **Categories** | Up to three. **Developer Tools** and **Productivity** fit OneCLI. |

For OneCLI Cloud these already exist: [onecli.sh](https://onecli.sh) is the landing page and [onecli.sh/privacy](https://onecli.sh/privacy) the policy.

> [!NOTE]
>
> Slack asks for an extra disclaimer when an app exposes people to a language model: say on the landing page and in the long description that outputs can be inaccurate. Slack also forbids training models on Slack data. Both matter for an agent app.

Expect scope questions during review. Slack approves only scopes tied to features it can test and asks what each one is for, so keep the list to what the app actually uses.

## FAQ

> [accordion] Can agents call the Slack API as a tool?
>
> No. Slack is a channel for talking to agents, not an app connection. There is no Slack credential to grant.

> [accordion] Can I approve agent actions from Slack?
>
> Yes. Approval cards let you approve or deny a pending action without leaving Slack. Set what needs approval when you [grant](https://onecli.sh/docs/guides/agent-access.md) connections or with [rules](https://onecli.sh/docs/guides/rules.md).

> [accordion] Who can install the Slack app?
>
> Someone who can install Slack apps in your workspace. After that, teammates DM the OneCLI app to get their own account.


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