These are the docs for the Metabase master branch. Some features documented here may not yet be available in the current release. Check out the docs for the current stable version, Metabase v0.59.

Set up Slack

Admin > Settings > Slack

If you want to have your dashboard subscriptions or alerts sent to Slack channels (or people on Slack), you need to first integrate your Metabase with Slack.

Both admins and people with 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:

    _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 and installed it in 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 and alerts 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:
  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.

Natural language questions in Slack

Once you’ve connected Slack, you can let people chat with Metabot directly in Slack channels. For more on what Metabot can do in Slack, see Metabot in Slack.

Prerequisites

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.

Further reading

Read docs for other versions of Metabase.

Was this helpful?

Thanks for your feedback!
Want to improve these docs? Propose a change.