Skip to main content

Configure Slack notifications

AI/BI dashboards support sending scheduled snapshots to Slack channels. This allows teams to receive dashboard updates directly in their Slack workspace. This page explains how to create a Slack app and configure a Slack channel as a notification destination. Dashboard editors can then add this notification destination as a subscriber to scheduled dashboards. For information about adding a Slack channel as a subscriber, see Subscribe a Slack channel.

Slack subscriptions deliver dashboard snapshots that include:

  • A PNG image snapshot of the dashboard visible directly in the channel
  • A direct link to open the dashboard in Databricks
  • A PDF snapshot attachment in the message thread

Example of a Slack notification showing a dashboard snapshot

Requirements

You must have the following permissions:

  • You must be a Databricks workspace admin to configure notification destinations.
  • You must have the appropriate permissions to create and install apps in your Slack workspace.

During the setup process, you collect authentication credentials from Slack to configure the Databricks notification destination.

After you configure the notification destination, any user with CAN EDIT permissions on a dashboard can add the Slack destination as a subscriber to schedules they manage.

Step 1: Create and configure a Slack app

Create a Slack app for your workspace and configure the necessary permissions.

Create the Slack app

  1. Go to Your apps in the Slack API documentation. You may be prompted to sign in to your Slack workspace.
  2. Click Create an app.
  3. Click From a manifest or From scratch, depending on whether you have a manifest file to add your app's basic information, or if you want to create it using Slack's configuration UI. See Slack's documentation about Configuring apps with app manifests for instructions about creating from a manifest.

After you create the app, the Slack app settings page opens automatically.

Add required OAuth scopes

  1. In the sidebar, under Features, click OAuth and Permissions.
  2. Scroll down to Scopes.
  3. Under Bot Token Scopes, click Add an OAuth Scope.
  4. Add the following scopes:
    • incoming-webhook
    • files:write
    • files:read
    • chat:write

Install the app in your workspace

  1. In the Slack app settings sidebar, under Settings, click Install App.
  2. Click Install or Request to Install.
  3. Select a destination channel in your workspace.
  4. Click Allow to complete the installation.

Retrieve authentication credentials

You need the following information from the Slack app to configure the Databricks notification destination:

  1. Bot User OAuth Token:
    • Navigate to OAuth & Permissions in the Slack app settings.
    • Copy the Bot User OAuth Token.
  2. Webhook URL:
    • Navigate to Incoming Webhooks in the Slack app settings.
    • Copy the Webhook URL for your destination channel.

Get the Slack channel ID

  1. In your Slack workspace, navigate to the destination channel.
  2. Click the channel name to open channel details.
  3. Copy the Channel ID from the channel details.

Step 2: Configure the notification destination in Databricks

Create a notification destination in your Databricks workspace that points to your Slack channel.

  1. Log in to your Databricks workspace.
  2. Click your username in the upper right corner of the workspace.
  3. Select Settings from the dropdown.
  4. In the Workspace admin section, click the Notifications tab.
  5. Click Manage in the Notification destinations section.
  6. Click Add destination.
  7. Select Slack from the destination type dropdown.
  8. Enter the following information:
    • Destination name: A descriptive name for this Slack destination
    • Webhook URL: The webhook URL from your Slack app
    • OAuth Token: The Bot User OAuth Token from your Slack app
    • Channel ID: The channel ID from your Slack workspace
  9. Click Create.

Users can now add this Slack notification destination as a subscriber to dashboard schedules.

For instructions on subscribing Slack channels to dashboard schedules, see Subscribe a Slack channel.

Troubleshooting

Use the following to troubleshoot common errors with Slack notifications.

Missing PDF attachment

If the Slack notification appears without a PDF attachment, verify that:

  • The OAuth token is correctly configured in the notification destination
  • The channel ID matches the destination channel
  • The Slack app has the required files:write scope

Notification not appearing

If notifications do not appear in your Slack channel:

  • Verify the webhook URL is correct and matches the destination channel
  • Check that the Slack app is installed in the workspace
  • Ensure the bot has been added to the destination channel
  • Confirm the schedule is active and not paused

Next steps