Configure Slack For Notifications
Install the DataHub Slack App into your Slack workspace
You can see the permissions required by the DataHub Slack bot below.
Video Walkthrough
Step-by-step guide
The following steps should be performed by a Slack Workspace Admin.
- Navigate to https://api.slack.com/reference/manifests#config-tokens
- Under Managing configuration tokens, select 'Generate Token'
- Select your workspace, then hit 'Generate'
- Now you will see two tokens available for you to copy, an Access Token and a Refresh Token
- Navigate back to your DataHub Slack Integration setup page, and paste the tokens into their respective boxes, and click 'Connect'.
- You will be automatically re-directed to Slack to confirm DataHub Slack App's permissions and complete the installation process.
You may need approval from a workspace admin to do this step. Learn about what to do in this scenario here.
Now proceed to the Subscriptions and Notifications page to see how you can subscribe to be notified about events on the platform, or visit the Slack App page to see how you can use DataHub's powerful capabilities directly within Slack.
DataHub Slack bot permissions
The DataHub Slack bot requires a certain set of scopes (permissions) to function. We've listed them below with thier explanations.
# Required for slash commands / shortcuts.
commands
# Required to get @DataHub messages and send messages as @DataHub.
app_mentions:read
chat:write
chat:write.public
# When sending messages we want to use a custom icon_url so that we can display the DataHub Cloud logo.
chat:write.customize
# Required to see conversation details + read messages.
channels:history
channels:read
groups:history
groups:read
im:history
im:read
mpim:history
mpim:read
metadata.message:read
# Required to get workspace ID and create links to user profiles.
team:read
# Allows the bot to join a public channel when someone configures notifications to be sent to one.
channels:join
# Required to unfurl links.
links:read
links:write
# Required to resolve user IDs to names/emails + enable lookup by email address.
users:read
users:read.email
# Future-proofing.
reactions:read
reactions:write
Workspace admin approval guide
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:
- On step #6 above, continue by clicking the button to request their approval.
- Once approved, you will get a notification from the Slack bot that your request has been approved. Follow the link it provides to complete the process. If you do not get the message: visit api.slack.com/apps, open your DataHub app and complete the installation from there.
- Once it is done, you can visit
<your-datahub-instance-url>/settings/notifications
, and send a test notification to verify everything's working. - Making Slack commands work: when running Slack commands such as
/datahub search my dataset
you may get adispatch_failed
error. To resolve this, see the steps here.
Sending Notifications
For now, we support sending notifications to
- Slack Channel Name (e.g.
#troubleshoot
) - Slack Channel ID (e.g.
C029A3M079U
) - Specific Users (aka Direct Messages or DMs) via user ID
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.
How to find Team ID and Channel ID in Slack
We recommend just using the Slack channel name for simplicity (e.g. #troubleshoot
).
Via Slack App:
- Go to the Slack channel for which you want to get a channel ID
- Click the channel name at the top
- At the bottom of the modal that pops up, you will see the Channel ID as well as a button to copy it
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
- Team ID =
TUMKD5EGJ
from above - Channel ID =
C029A3M079U
from above
How to find User ID in Slack
Your User ID
- Click your profile picture, then select 'Profile'
- Now hit the '...' and select 'Copy member ID'
Someone else's User ID
- Click their profile picture in the Slack message
- Now hit the '...' and select 'Copy member ID'