docs/managed-datahub/slack/saas-slack-setup.md
import FeatureAvailability from '@site/src/components/FeatureAvailability';
The following steps should be performed by a Slack Workspace Admin.
:::note You may need approval from a workspace admin to do this step. Learn about what to do in this scenario below. :::
<p align="center"> </p> 7. Congrats 🎉 Slack is set up! Now try it out by going to the **Platform Notifications** page <p align="center"> </p> 8. Enter your channel in, and click **'Send a test notification'** <p align="center"> </p>Now proceed to connect your Slack account so you can use Subscriptions & Notifications and Ask DataHub, or visit the Slack App page to learn more about DataHub's Slack capabilities.
The DataHub Slack bot requires a certain set of Slack scopes to function properly. By default, all
scopes listed below — including the four message-history scopes — are required at install time.
If your security or compliance team objects to granting broad message-read access, the four
*:history scopes can be made optional for your instance; see
Optional scopes and trade-offs below.
| Scope | Purpose |
|---|---|
commands | Required for slash commands / shortcuts |
app_mentions:read | Required to get @DataHub messages |
chat:write | Required to send messages as @DataHub |
chat:write.public | Required to post in public channels the bot hasn't joined |
chat:write.customize | Allows using a custom icon so messages display the DataHub Cloud logo |
channels:history | Required to read message history in public channels |
channels:read | Required to see public channel details |
groups:history | Required to read message history in private channels |
groups:read | Required to see private channel details |
im:history | Required to read direct message history |
im:read | Required to see direct message details |
mpim:history | Required to read group DM history |
mpim:read | Required to see group DM details |
metadata.message:read | Required to read message metadata |
team:read | Required to get workspace ID and create links to user profiles |
channels:join | Allows the bot to join a public channel when someone configures notifications to be sent to one |
links:read | Required to unfurl links |
links:write | Required to unfurl links |
users:read | Required to resolve user IDs to names/emails |
users:read.email | Required to enable user lookup by email address |
reactions:read | Future-proofing |
reactions:write | Future-proofing |
By default, the four message-history scopes (channels:history, groups:history, im:history,
mpim:history) are required at install time. The DataHub Slack app supports running these
scopes as Slack optional scopes
instead — letting your Slack workspace admin decline them — but this is not the default and is
not something you can toggle yourself in the Slack app settings.
To make the four *:history scopes optional for your DataHub Cloud instance, contact your
DataHub Cloud representative to enable it. Once enabled, your workspace admin can decline those
scopes during install (or remove them later) and the trade-offs below will apply.
These scopes are only used to give Ask DataHub access to the surrounding conversation when someone @-mentions the bot, so that follow-up questions ("what about the staging table?") can be resolved against earlier messages in the thread or channel.
*:history scopes are not grantedIf optional scopes have been enabled for your instance and your Slack admin declines (or removes)
the four *:history scopes:
In some workspaces, you will find at step 6 above you will need approval from your workspace admin. In this case, you will want to:
<your-datahub-instance-url>/settings/notifications, and send a test notification to verify everything's working./datahub search my dataset you may get a dispatch_failed error. To resolve this, see the steps here.:::info Starting in v0.3.17, all users are required to connect their DataHub account to Slack via OAuth in order to use Subscriptions & Notifications and Ask DataHub. This ensures that DataHub can securely link your DataHub user to your corresponding Slack account, and use your credentials when performing actions on DataHub. :::
Connecting your Slack account is a one-time setup. Once connected, DataHub will be able to securely identify you across both platforms.
Click the Connect to Slack button. You will be redirected to Slack's OAuth login page.
Sign in to your Slack workspace if prompted, and authorize DataHub to access your Slack identity.
After authorizing, you will be redirected back to DataHub. Your DataHub account is now linked to your Slack account.
If you try to use Ask DataHub in Slack before connecting your account, the bot will prompt you to connect first:
<p align="center"> </p>Once connected, you can use Subscriptions & Notifications and Ask DataHub. If you ever need to reconnect (e.g. you changed Slack workspaces), you can return to this page and click Reconnect.
:::note Migrating from Manual Slack User ID Configuration If you previously configured your Slack User ID manually (see legacy instructions below), your existing setup will continue to work until you connect your account using the new OAuth flow. Once you connect via OAuth, DataHub will use the OAuth-linked account going forward. Starting in v0.3.17, manual Slack User ID configuration for subscriptions & notifications is no longer available. :::
We support sending notifications to
#troubleshoot)C029A3M079U)By default, the Slack app will be able to send notifications to public channels. If you want to send notifications to private channels or DMs, you will need to invite the Slack app to those channels.
Learn more about how subscriptions and notifications work, including what things you can be notified about and all the places you can receive notifications.
:::note
We recommend just using the Slack channel name for simplicity (e.g. #troubleshoot).
:::
Via Slack App:
Via Web:
Go to the Slack channel for which you want to get a channel ID
Check the URL e.g. for the troubleshoot channel in OSS DataHub Slack
Notice TUMKD5EGJ/C029A3M079U in the URL
TUMKD5EGJ from aboveC029A3M079U from above:::caution Deprecated Manual Slack User ID configuration is deprecated as of v0.3.17. Please use the Connect Your Slack Account flow instead. If you previously configured your Slack User ID manually, it will continue to work until you connect via OAuth. :::
Your User ID
Someone else's User ID