# Slack

> Add the LevelFour agent to your Slack workspace to ask about your Cloud, SaaS and AI spend, and to get your cost alerts there.

Source: https://docs.levelfour.ai/integrations/slack


LevelFour joins Slack as an agent. Open it from its **Messages** tab, or mention `@levelfour` in any channel, and ask about your Cloud, SaaS and AI spend. It answers in a thread under your message, from your organization's own data, and you can follow up in that thread.

It also posts your [cost alerts](/cost-alerts): in the channels each alert names, and as a direct message to each person who turns Slack on for them. Every organization can connect it.

## Prerequisites

* You can install apps in the Slack workspace. Many workspaces reserve this for admins, or require an admin to approve the request.
* You are signed in to `https://dashboard.levelfour.ai` as a member of the LevelFour organization you are connecting to.

## Connect

### Open Settings, then Integrations

In the dashboard sidebar, click **Settings**, then **Integrations**, then the **Slack** tile.

### Add to Slack

Click **Add to Slack**. Slack opens in a new tab with the permission screen.

Approve the requested access. Two kinds of permission are optional:

* **Reading messages.** Decline it and the bot still answers whenever you mention `@levelfour`. Approve it and you can follow up in its threads without the mention, and message it directly.
* **Agent view.** Approve it and LevelFour shows suggested prompts in its **Messages** tab, shows what it is reading while it answers, and gets a stop button. Decline it and answers arrive as ordinary replies.

### Ask your first question

Come back to the dashboard tab and wait for the panel to read **Connected**.

Then invite the bot to a channel and ask it something:

```text
/invite @levelfour
@levelfour what are our top 5 savings?
```

It answers in a thread under your message.

## Asking questions

* **Start a conversation** by mentioning `@levelfour` in any channel it belongs to. It opens a thread under your message and answers there.
* **Follow up** by replying in that thread. With the thread-reading permissions approved you do not need to mention it again. A reply that mentions someone else is left to them.
* **Ask inside someone else's thread** by mentioning it there. It answers that one question and leaves the rest of the thread to the people in it.
* **Message it directly** from the LevelFour app's **Messages** tab in Slack. It answers in a thread under your message.
* **Check your setup** with `/levelfour help`, or send `help` in a message. It shows how to ask, which LevelFour organization the workspace is connected to, and whether your Slack account is linked. In a channel, only you see the reply.
* **Pass something on** to the LevelFour team, such as a feature request or a problem: ask the bot to pass it on, and it sends the team your words.

The bot answers as you. Your Slack email has to belong to a member of the LevelFour organization, and your LevelFour role has to include the FinOps agent. When either is missing, it tells you privately what to fix.

### While it answers

* **Progress.** LevelFour shows a card for each kind of data it reads, such as your forecast or your savings, and ticks it off when the read finishes. It checks the answer against your data before showing it, so a figure never appears and then vanishes.
* **Quick follow-ups.** Send a follow-up while it is still answering and it waits for that answer, then builds on it. A third message in the meantime gets a note to ask again.
* **Stop.** Stop a question you asked once you no longer need it. It stops reading and says so. Only the person who asked can stop an answer. Reply `continue` in the thread and it answers the question you stopped.
* **Rating.** Each answer carries **Good answer** and **Not right**. Your vote is your own, whoever asked the question. **Not right** sends the LevelFour team the question and the answer, and shows only you a **Tell us what was wrong** button. Its short form sends the team what you type.

LevelFour writes its answers with AI from your organization's own data. Check important figures in LevelFour before acting on them.

> **Note**
>
> The suggested prompts, the progress cards and the stop button need a paid Slack plan. Mentions and direct messages work on every plan.

### Making changes

The bot reads and explains. To accept or reject a saving, change a cost alert or edit a tag, use LevelFour: ask the bot and it links you to the right page.

## Cost alerts in Slack

The bot posts nothing on its own except the cost alerts your organization arms. Each alert reaches Slack in two ways.

* **Channels.** Each alert picks its own channels, up to 10, under **Slack channels** in its form, and each gets one post when the alert fires. The list shows the public channels and the private ones `@levelfour` is already in, so invite it to a private channel first.
* **A direct message.** Each person turns this on for themselves with the **Slack** switch on the **Cost alert** row of **Settings > Notification preferences**, or in an alert's form under **Your Slack DMs**. LevelFour looks them up in the workspace by their email. When it cannot message them, the switch in the alert's form stays off and says why. Until the organization connects Slack, the **Slack** switches on **Notification preferences** are grayed out. A direct message only reaches someone the alert names as a recipient.

Every other notification can reach Slack the same way: mentions, approvals, applied and failed savings, renewals and setup reminders each have a **Slack** switch on their row. See [Notifications](/notifications).

### The default channel

**Default channel for new cost alerts**, under **Settings > Integrations > Slack**, is the channel a new alert starts with. LevelFour posts a short confirmation in the channel when you choose it. It posts nothing else by itself: changing it moves no existing alert, and **Clear default** starts new alerts with no channel. Admins and members can choose it; viewers see which channel it is.

### Investigate an alert

Click **Investigate** on an alert and the bot explains it in the alert's thread: what it observed, what caused it and what you could do. Whoever clicks first starts it, and anyone who clicks after that sees it is already under way. A Kubernetes alert has no **Investigate**, because the bot cannot read Kubernetes data yet: **Open in LevelFour** takes you to the workload, namespace or cluster it watches. You can also reply under an alert, in the channel or the direct message, and the bot answers about that alert. Without the message-reading permissions, mention `@levelfour` in the reply.

## What LevelFour keeps

LevelFour keeps a Slack conversation for 90 days after its last message, so a follow-up next week still has its context, and then deletes it. Diagnostics for each answer record timings and token counts, not the conversation.

A **Not right** vote sends the LevelFour team the question and the answer. **Tell us what was wrong**, and any request the bot passes on, send the team that person's own words. [Security](/account/security) covers how LevelFour keeps the rest of your data.

## Removing access

Click **Disconnect** on the Slack panel under **Settings > Integrations**. Cost alerts stop posting to Slack too. To remove the app from Slack as well, open your workspace's **Manage apps** page and remove LevelFour there. To take the bot out of a single channel, run `/remove @levelfour` in it.

## Troubleshooting

| Symptom                                                                  | What to do                                                                                                                                               |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The panel waits for authorization                                        | The Slack tab was closed before you approved. Click **Try again**                                                                                        |
| The bot does not answer a mention                                        | Check the bot is in the channel with `/invite @levelfour`, then run `/levelfour help` to see whether your Slack account is linked                        |
| The bot answers follow-ups only when mentioned                           | The workspace declined the optional thread-reading permissions. Reconnect and approve them                                                               |
| The bot says your Slack email does not match                             | Ask a LevelFour admin to invite that address, or sign in to LevelFour with the email your Slack account uses                                             |
| Slack says the app needs admin approval                                  | Your workspace restricts app installs. Ask a Slack admin to approve the request                                                                          |
| The Slack switch for cost alerts says your email is not in the workspace | Your LevelFour email has no account in this Slack workspace. Sign in to LevelFour with the email your Slack account uses, or ask a Slack admin to add it |
| The channel you want is missing from the list                            | A private channel appears once `@levelfour` is in it. Run `/invite @levelfour` there, then open the list again                                           |
| The bot does not answer a direct message                                 | The workspace declined the optional message-reading permissions. Reconnect and approve them                                                              |
| There are no suggested prompts and no stop button                        | The workspace declined the optional agent permission, or is on a free Slack plan. Reconnect and approve it                                               |
| **Investigate** says the alert is already being investigated             | Someone clicked it first. The answer is in the alert's thread                                                                                            |
| **Investigate** says it cannot investigate a Kubernetes alert            | The bot cannot read Kubernetes data yet. Click **Open in LevelFour** on the alert to see the workload                                                    |
| The bot says it is still answering the previous question                 | That thread already has a follow-up waiting. Ask again once the answer arrives                                                                           |
| **Tell us what was wrong** says the form did not open                    | Slack allows a few seconds to open it. Click the button again                                                                                            |

## Next

* [Cost alerts](/cost-alerts) covers the rules that post here
* [Integrations](/integrations) lists the other tools you can connect
* [Slack billing](/connectors/slack-billing) is separate, and it reads your Slack contract amount
