---
title: "Set up Slack"
description: "Connect Metabase to Slack to send alerts and dashboard subscriptions to your channels, and to ask Metabot questions from Slack."
url: "https://www.metabase.com/docs/latest/configuring-metabase/slack"
version: "65"
---

> For the complete documentation index, see [llms.txt](https://www.metabase.com/docs/llms.txt).

# Set up Slack

_Admin > Settings > Slack_

If you want to have your [dashboard subscriptions](https://www.metabase.com/docs/latest/dashboards/subscriptions.md) or [alerts](https://www.metabase.com/docs/latest/questions/alerts.md) sent to Slack channels (or people on Slack), you need to first integrate your Metabase with Slack.

Both admins and people with [settings access](https://www.metabase.com/docs/latest/permissions/application.md#settings-access) can set up Slack.

## Create your Slack App

For Metabase to post to your Slack channels, you’ll need to create a Slack App and make it available to Metabase.

1. In Metabase, go to **Admin > Settings > Slack**.
2. Click **Connect to Slack**.
3. Click **Create a Slack App**. Metabase will open a new tab with the Slack website.
4. On the Slack website, click **Create an App**.
5. Pick a workspace to develop your app.
6. You may get a warning that says **This app is created from a 3rd party manifest. Always verify URLs and permissions below.**

   This warning is expected (Metabase is the third party here). You can click on **Edit configurations** to see the app manifest Metabase sent along in the URL. Here is the manifest in YAML format:

   ```yml
   _metadata:
     major_version: 1
     minor_version: 1
   display_information:
     name: Metabase
     description: Bringing the power of Metabase to your Slack #channels!
     background_color: "#509EE3"
   features:
     bot_user:
       display_name: Metabase
   oauth_config:
     scopes:
       bot:
         - users:read
         - channels:read
         - channels:join
         - files:write
         - chat:write
         - chat:write.customize
         - chat:write.public
         - groups:read
   ```

   The manifest just takes care of some settings for your app and helps speed things along.

7. Click the **Next** button. Then hit **Create** to set up your Slack app.

## Install your app to your workspace

1. On the Slack site for your newly created app, go to **Settings** > **Basic Information** tab
2. Under **Install your app**, click on **Install to workspace**.
3. On the next screen, click **Allow** to give Metabase access to your Slack workspace.

## Configure your app in Metabase

Once you [created the app](#create-your-slack-app) and [installed it in your workspace](#install-your-app-to-your-workspace), you tell Metabase to use it by giving Metabase the OAuth token for the app.

To obtain the OAuth token for the Slack app:

1. Go to the Slack site page for your Slack app.
2. On the Slack page for your app, go to **OAuth & Permissions** in the left sidebar.
3. On the **OAuth & Permissions** page for your Slack app, copy the **Bot User OAuth Token**.

To set up the app in Metabase:

1. In Metabase, go to **Admin > Settings > Slack**. Click **Connect to Slack**.
2. Paste the token into **Slack bot user OAuth token**.
3. **Save changes** in Metabase.

   Metabase will automatically run a quick test to check that the API token is working properly. If something goes wrong, it'll give you an error message.

## Set your app icon

To give your Slack app the Metabot avatar:

1. In Metabase, go to **Admin > Settings > Slack** and click **Download App Icon**.
2. On the Slack site, go to your app's **Basic Information** page.
3. Under **Display Information**, upload the icon you downloaded.

## Sending alerts and subscriptions to private Slack channels

In order to send [subscriptions](https://www.metabase.com/docs/latest/dashboards/subscriptions.md) and [alerts](https://www.metabase.com/docs/latest/questions/alerts.md) to private Slack channels, you must first add the Metabase app to the private channel.

To add your app to a private Slack channel:

1. In Slack, go to the private channel and mention the Metabase app. For example, if you called your Slack app "Metabase", you'd just type `@Metabase`.

2. Slack will ask you if you want to invite your app to your channel, which you should.

Once you added the app to a private channel, you should see the channel in the list of channels when setting up a subscription or alerts within 10 mins (it can take a little time for Metabase to see all the channels the app has been invited to).

In order for Metabase to see private channels, the app must have the `groups:read` OAuth scope. Although this scope should be granted when setting up the app through Metabase, older installations might not have this scope.

To check or edit your OAuth settings:

1. [Visit the app settings in slack](https://api.slack.com/apps/):
2. Click on the Metabase app in the list of apps.
3. Go to **OAuth & Permissions** in the sidebar.
4. Under **Scopes**, add the `groups:read` scope if it's not added already.
5. Reinstall the app by clicking the **Reinstall** button under **OAuth Tokens**.

## Natural language questions in Slack

> Natural language questions in Slack require [Metabot](https://www.metabase.com/docs/latest/ai/metabot.md).

![Natural language questions in Slack](https://www.metabase.com/docs/latest/ai/images/metabot-slack.png)

Once you've connected Slack, you can let people chat with [Metabot](https://www.metabase.com/docs/latest/ai/metabot.md) directly in Slack channels. For more on what Metabot can do in Slack, see [Metabot in Slack](https://www.metabase.com/docs/latest/ai/metabot-slack.md).

### Prerequisites

- [Slack connected to Metabase](#create-your-slack-app).
- [Metabot set up](https://www.metabase.com/docs/latest/ai/settings.md) on your Cloud instance. If Metabot isn't set up yet, you'll see a notice to **Go to Metabot connection settings** first.
- [Encryption at rest](https://www.metabase.com/docs/latest/databases/encrypting-details-at-rest.md) enabled.

### Set up Metabot in Slack

1. Go to **Admin > Settings > Slack**.
2. Under **Natural language questions in Slack**, enter the credentials from your Slack app's **Basic Information** page (under **App Credentials**):
   - **Client ID**
   - **Client Secret** (click **Show** to reveal)
   - **Signing Secret** (click **Show** to reveal)
3. Click **Save changes**.
4. If Metabase detects missing OAuth scopes, follow the prompts to update your Slack app's permissions and reinstall the app.
5. Toggle **Let people chat with Metabot** to enable or disable Metabot in Slack.

To remove the Metabot Slack configuration, click **Remove** at the bottom of the section.

## Configure Slack with environment variables

On self-hosted Metabases, you can also set these settings with [environment variables](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.md).

| Setting                                                       | Environment variable                                                                          |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Slack bot user OAuth token](#configure-your-app-in-metabase) | [`MB_SLACK_APP_TOKEN`](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.md#mb_slack_app_token)                         |
| [Client ID](#set-up-metabot-in-slack)                         | [`MB_SLACK_CONNECT_CLIENT_ID`](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.md#mb_slack_connect_client_id)         |
| [Client Secret](#set-up-metabot-in-slack)                     | [`MB_SLACK_CONNECT_CLIENT_SECRET`](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.md#mb_slack_connect_client_secret) |
| [Let people chat with Metabot](#set-up-metabot-in-slack)      | [`MB_SLACK_CONNECT_ENABLED`](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.md#mb_slack_connect_enabled)             |

## Further reading

- [Alerts](https://www.metabase.com/docs/latest/questions/alerts.md)
- [Dashboard subscriptions](https://www.metabase.com/docs/latest/dashboards/subscriptions.md)
- [Metabot](https://www.metabase.com/docs/latest/ai/metabot.md)
- [Metabot in Slack](https://www.metabase.com/docs/latest/ai/metabot-slack.md)
- [Metabot AI settings](https://www.metabase.com/docs/latest/ai/settings.md)
- [Notification permissions](https://www.metabase.com/docs/latest/permissions/notifications.md)
- [Setting up email](https://www.metabase.com/docs/latest/configuring-metabase/email.md)
- [Usage analytics](https://www.metabase.com/docs/latest/usage-and-performance-tools/usage-analytics.md)
