# Slack

> Install the Ace Slack app so your team can start investigations with @Ace, follow incidents in your channels and approve Ace's actions in Slack.

Source: https://tryace.dev/docs/integrations/slack

Ace posts incidents and weekly reports to the Slack channels you choose, answers when someone mentions it, and posts action plans that your team can approve right in the thread.

| | |
| --- | --- |
| Category | Communication |
| Ace reads | Messages that mention Ace, direct messages to Ace, replies in threads Ace takes part in, reactions, channel list and member directory |
| Ace can change | Posts messages, reactions and files in Slack. Nothing else |
| Opens incidents | You can start an investigation with `@Ace investigate <workload>` |
| Setup | Slack app |

## What Ace reads

- Messages that mention `@Ace`, and direct messages to Ace.
- Replies in threads Ace takes part in, including edits and deletions of replies to Ace.
- Reactions and button clicks on Ace's messages.
- Your channel list, so admins can choose where Ace posts.
- Your member directory, so admins can link Ace members to their Slack accounts.

Ace redacts credentials and personal details from a Slack reply before it stores the reply as an engineer note or in memory. See [Memory](https://tryace.dev/docs/concepts/memory) and [Security and data](https://tryace.dev/docs/security/security-and-data).

## What Ace can change

Ace changes nothing outside Slack, and it posts to the channel you choose for each purpose:

| Purpose | What Ace posts |
| --- | --- |
| **Insights** | Real-time incidents and investigation starts |
| **Weekly reports** | Incident summaries and organization-wide analysis |

Ace also replies in threads and direct messages, adds reactions and uploads files. With **Show each teammate in Slack** on, each of Ace's teammates posts under its own name and icon, and with it off, every update comes from Ace.

### Approve actions in Slack

When Ace proposes an action, it posts the exact plan in the incident thread. The card has **Decline** and an approve button named for the action, such as **Approve rollback** or **Generate fix**. It also shows **Edit values** when the plan has values you can change, and **Something else…** to ask for a different plan in your own words.

Because a click in Slack only tells Ace which Slack user clicked, Ace checks the person who clicked against your Ace roles:

- They must be an Ace member with a linked Slack account.
- A production change needs an admin, or a member with approval permission for that kind of action and environment.
- If someone without permission tries to approve, Ace mentions up to three people in the thread who can.

Under Earned autonomy, an automatic action still gives your team a chance to stop it. Before one runs, Ace posts a countdown in Slack with a way to cancel, and if Ace can't deliver the countdown, the action doesn't run. Automatic Kubernetes repairs and automatic pull request merges both depend on it. See [Actions and approvals](https://tryace.dev/docs/concepts/actions-and-approvals).

You can also ask for a change in plain words, for example `@Ace scale checkout to 6 tasks`, and Ace prepares the exact plan and posts it for approval.

## What opens an incident

Slack isn't an alert source, but a linked Ace member can start an investigation:

```text
@Ace investigate checkout-api
```

Ace finds the workload by name and replies with a confirmation only you can see, with **Start investigation** and **Cancel**. If the name matches more than one workload, Ace asks which one you mean. When you confirm, Ace investigates the workload over the last hour and links to the incident.

Ace also understands these commands:

| Command | What it does |
| --- | --- |
| `help <workload>` | Lists what Ace can do on that workload |
| `runbook` | Shows open actions |
| `runbook <INS-ID>` | Shows actions for one incident |
| `stop` | Ace leaves the thread |

## Before you start

- You're signed in to Ace in a workspace that has finished onboarding.
- You can install apps in your Slack workspace.
- Only an Ace **admin** can choose channels and link members' Slack accounts.

## Credentials and permissions

Ace connects through Slack OAuth with these bot scopes:

| Scope | Why Ace needs it |
| --- | --- |
| `app_mentions:read` | Receives messages that mention `@Ace` |
| `channels:history`, `groups:history`, `im:history`, `mpim:history` | Reads replies in threads Ace takes part in, in public and private channels and direct messages |
| `channels:read`, `groups:read`, `im:read`, `mpim:read` | Lists channels and conversations for routing |
| `chat:write` | Posts incidents, reports, replies and approval cards |
| `chat:write.customize` | Posts under a teammate's name and icon |
| `files:write` | Uploads files to threads |
| `reactions:read`, `reactions:write` | Reads reactions on Ace's messages and adds its own |
| `users:read` | Lists members so admins can link them to Ace |
| `assistant:write` | Shows Ace's status in Slack's agent view |

## Set up

1. In Ace, go to **Settings** > **Slack** and choose **Connect Slack**. Slack opens in a popup, so if your browser blocks it, allow popups for Ace and try again.
2. In Slack, choose your workspace, review the permissions and choose **Allow** within 15 minutes.
3. Under **Channels**, use **Add a channel…** to add a channel to **Insights** and to **Weekly reports**.
4. In **Settings** > **Team**, link each member's **Slack account** with **Choose a Slack account**. Members need a linked account to approve actions or start investigations in Slack, and the person who installed the app is linked automatically.

## Confirm it's working

- **Settings** > **Slack** shows **Connected** with your Slack workspace name and **Ace is live in this workspace**.
- When you mention `@Ace` in a channel, Ace replies in the thread.
- If the connection fails, Ace shows why, for example **Slack authorization was denied or cancelled.** or **Authorization request expired. Please try again.**

## Disconnect

Ace has no disconnect button for Slack. Instead, remove the Ace app from your workspace in Slack's app management, which revokes Ace's bot token.

To unlink one member, unlink their Slack account in **Settings** > **Team**.

## Next steps

- [Actions and approvals](https://tryace.dev/docs/concepts/actions-and-approvals): who can approve and how Ace announces automatic actions.
- [Roles and permissions](https://tryace.dev/docs/security/roles-and-permissions): admins, members and approval permission.
- [How Ace works](https://tryace.dev/docs/concepts/how-ace-works): from the first alert to a closed incident.
