Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Docs metabot slack (#71526)

Jeff Bruemmer48c41ec6c840
diff --git a/docs/ai/metabot-slack.md b/docs/ai/metabot-slack.md
new file mode 100644
index 00000000000..fddf1e8ffb6
--- /dev/null
+++ b/docs/ai/metabot-slack.md
@@ -0,0 +1,68 @@
+---
+title: Metabot in Slack
+summary: Chat with Metabot directly in Slack to ask questions about your data, get charts, upload CSVs, and manage subscriptions.
+---
+
+# Metabot in Slack
+
+![Metabot in Slack](./metabot-slack.png)
+
+Chat with [Metabot](./metabot.md) in Slack. Direct message Metabot for private analysis, or mention @Metabot in a channel to collaborate with your team.
+
+## What Metabot can do
+
+From Slack you can ask Metabot to:
+
+- **Find existing content**: Search your Metabase for questions, and dashboards. Metabot links you directly to the content in your Metabase.
+- **Answer questions**: Create ad-hoc queries from natural language to answer your questions on the spot. You can click the link to save the question in Metabase.
+- **Show charts and tables**: Render static visualizations or tabular results in Slack. You can copy table results or download them as TSV.
+- **Work with CSVs**: [Upload a CSV](../databases/uploads.md) to Metabase, then ask follow-up questions about the data.
+- **Manage notifications**: Create [subscriptions](../dashboards/subscriptions.md) and [alerts](../questions/alerts.md) from within a channel. Metabot can find an answer and subscribe you to it in one go (though Metabot won't create new questions or dashboards).
+
+## Set up Metabot in Slack
+
+### 1. Set up Metabot
+
+Make sure [Metabot is set up](./settings.md) on your Metabase.
+
+### 2. Connect Slack to Metabase
+
+This is the basic Slack integration that lets Metabase send alerts and subscriptions to Slack channels. Follow the setup guide in [Set up Slack](../configuring-metabase/slack.md#create-your-slack-app).
+
+### 3. Enable natural language questions
+
+This is the setting lets people chat with Metabot in Slack.
+
+Follow the steps in [Set up Metabot in Slack](../configuring-metabase/slack.md#set-up-metabot-in-slack) to add your Slack app credentials.
+
+If you already have a Slack integration from before this feature existed, your Slack app will need additional permissions for natural language questions. The UI walks you through upgrading your app's permissions. Your existing alerts and subscriptions will keep working without upgrading; the new permissions are only needed for Metabot.
+
+### 4. Connect your Slack account to Metabase
+
+To chat with Metabot, people will need to link their Slack account to their Metabase account. The first time you message Metabot, it kicks off an OAuth flow that connects the two accounts. This connection lets Metabot use your Metabase permissions, so Metabot will only see data you're allowed to see.
+
+## Chatting with Metabot in Slack
+
+- **Message Metabot directly** for private conversations with your data. No @mention needed.
+- **@Metabot in a channel** so your team can see the question and answer. Metabot only responds to messages that @mention it in channels.
+- **Add Metabot as an AI app** in Slack's sidebar for quick access.
+
+### Clearing context
+
+Metabot remembers the context of a thread. To clear context and start a fresh conversation, either begin a new direct message or @mention Metabot in a new thread in a channel.
+
+## Notes on privacy
+
+### Answers are visible to everyone in your Slack channel
+
+If you ask Metabot a question in a public channel, _everyone_ in that channel can see the response. So even though Metabot respects your Metabase [permissions](../permissions/introduction.md) (Metabot can only see what you see), be thoughtful about questions that could surface sensitive data to others that may lack your permissions.
+
+### Feedback forms contain your conversation history
+
+When you submit feedback, the form you send may contain sensitive data from your conversation.
+
+## Further reading
+
+- [Metabot](./metabot.md)
+- [Metabot AI settings](./settings.md)
+- [Set up Slack](../configuring-metabase/slack.md)
diff --git a/docs/ai/metabot-slack.png b/docs/ai/metabot-slack.png
new file mode 100644
index 00000000000..4ff29316df3
Binary files /dev/null and b/docs/ai/metabot-slack.png differ
diff --git a/docs/ai/metabot.md b/docs/ai/metabot.md
index 9255b39c423..b787e03a6db 100644
--- a/docs/ai/metabot.md
+++ b/docs/ai/metabot.md
@@ -5,8 +5,6 @@ summary: Metabot is Metabase's AI assistant that helps you analyze data, create
# Metabot - Metabase's AI assistant
-> Metabot is only available as an add-on on Metabase Cloud.
-
![Meet Metabot](./images/metabot.png)
Metabot helps you analyze your data by creating charts from natural language, generating SQL queries, fixing query errors, and analyzing existing visualizations.
@@ -26,6 +24,7 @@ Metabot can help you to:
- [Analyze a chart](#analyze-charts-with-metabot).
- [Fix errors in SQL code](#have-metabot-fix-sql-queries).
- Answer questions from our documentation (as in, the literature you're reading right now).
+- [Chat with Metabot in Slack](./metabot-slack.md).
Like with all generative AI, you'll always need to double-check results.
@@ -124,6 +123,10 @@ Open it from **+ New → AI exploration**, then ask a question or pick one of th
When answering questions in AI exploration, Metabot searches a limited set of content instead of your entire Metabase. Admins can set a **Collection for natural language querying** to scope AI exploration to a specific collection and its subcollections. You can still refer to content outside that scope by explicitly @-mentioning it in your prompt. See [Metabot AI settings](../ai/settings.md) for more details.
+## Metabot in Slack
+
+Slack Metabot directly or @mention it in a channel to ask questions about your data. See [Metabot in Slack](./metabot-slack.md).
+
## Giving feedback on Metabot responses
When you hover over Metabot's responses, you'll see options to give feedback.
diff --git a/docs/ai/start.md b/docs/ai/start.md
index dbeabf360c9..e238435b966 100644
--- a/docs/ai/start.md
+++ b/docs/ai/start.md
@@ -21,3 +21,7 @@ Use your own API key to generate SQL from natural language on self-hosted Metaba
## [Agent API](./agent-api.md)
A REST API for building headless, agentic BI applications on top of Metabase's semantic layer.
+
+## [Metabot in Slack](./metabot-slack.md)
+
+Chat with Metabot directly in Slack — ask questions, get charts, and manage subscriptions without leaving Slack.
diff --git a/docs/configuring-metabase/slack.md b/docs/configuring-metabase/slack.md
index edf34dca5b6..b4fa28314ec 100644
--- a/docs/configuring-metabase/slack.md
+++ b/docs/configuring-metabase/slack.md
@@ -6,7 +6,7 @@ redirect_from:
# Set up Slack
-_Admin > Settings > Notification channels > Slack_
+_Admin > Settings > Slack_
If you want to have your [dashboard subscriptions](../dashboards/subscriptions.md) or [alerts](../questions/alerts.md) sent to Slack channels (or people on Slack), you need to first integrate your Metabase with Slack.
@@ -16,7 +16,7 @@ Both admins and people with [settings access](../permissions/application.md#sett
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 > Notification channels**.
+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**.
@@ -49,7 +49,7 @@ For Metabase to post to your Slack channels, you’ll need to create a Slack App
- groups:read
```
- The manifest just take cares of some settings for your app and helps speed things along.
+ 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.
@@ -63,7 +63,7 @@ For Metabase to post to your Slack channels, you’ll need to create a Slack App
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 aopp:
+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.
@@ -71,12 +71,20 @@ To obtain the OAuth token for the Slack aopp:
To set up the app in Metabase:
-1. In Metabase, go to **Admin > Settings > Notification channels > Slack**. Click **Connect to Slack**.
+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](../dashboards/subscriptions.md) and [alerts](../questions/alerts.md) to private Slack channels, you must first add the Metabase app to the private channel.
@@ -89,7 +97,7 @@ To add your app to a private Slack channel:
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.
+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:
@@ -99,10 +107,40 @@ To check or edit your OAuth settings:
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](../ai/metabot.md).
+
+![Natural language questions in Slack](../ai/metabot-slack.png)
+
+Once you've connected Slack, you can let people chat with [Metabot](../ai/metabot.md) directly in Slack channels. For more on what Metabot can do in Slack, see [Metabot in Slack](../ai/metabot-slack.md).
+
+### Prerequisites
+
+- [Slack connected to Metabase](#create-your-slack-app).
+- [Metabot set up](../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](../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.
+
## Further reading
- [Alerts](../questions/alerts.md)
- [Dashboard subscriptions](../dashboards/subscriptions.md)
+- [Metabot](../ai/metabot.md)
+- [Metabot in Slack](../ai/metabot-slack.md)
+- [Metabot AI settings](../ai/settings.md)
- [Notification permissions](../permissions/notifications.md)
- [Setting up email](./email.md)
- [Usage analytics](../usage-and-performance-tools/usage-analytics.md)
diff --git a/docs/configuring-metabase/start.md b/docs/configuring-metabase/start.md
index e41a2ed2d95..a39ee8e6615 100644
--- a/docs/configuring-metabase/start.md
+++ b/docs/configuring-metabase/start.md
@@ -22,7 +22,7 @@ Set up email for [Alerts](../questions/alerts.md) and [Dashboard subscriptions](
Set up Slack for Alerts and Dashboard subscriptions.
-### [Webhooks](./webhooks.md)
+## [Webhooks](./webhooks.md)
Set up webhooks as notification channels for alerts.
diff --git a/docs/configuring-metabase/webhooks.md b/docs/configuring-metabase/webhooks.md
index c0381958e59..200f090b1e8 100644
--- a/docs/configuring-metabase/webhooks.md
+++ b/docs/configuring-metabase/webhooks.md
@@ -13,15 +13,15 @@ For now, webhooks are only available for [alerts](../questions/alerts.md); you c
## Create a webhook
-_Admin > Settings > Notification channels_
+_Admin > Settings > Webhooks_
Before people can send alerts to a webhook, an admin or someone with [settings access](../permissions/application.md#settings-access) will need to create a webhook to target.
To create a webhook:
1. Click the **grid** icon in top right corner and select **Admin**.
-2. In the Admin console, go **Settings > Notification channels**.
-3. In **Webhooks for alerts**, click **Add a webhoor**.
+2. In the Admin console, go **Settings > Webhooks**.
+3. In **Webhooks for alerts**, click **Add a webhook**.
4. Metabase will show you a short form to fill out:
- **Webhook URL**. Where you want Metabase to send the results of an alert. Must be a valid URL.