Skip to main content

Configure Slack notifications for DataHub activity Limited availability

Get activity notifications for your DataHub service in a Slack channel, including new datasets, ownership changes, tags, and glossary updates.

You can enable Slack notifications by configuring a Slack app and setting environment variables on the actions app.

Prerequisites

  • A Slack workspace where you can create and install apps.
  • The ID of the Slack channel to send notifications to.

Create and configure a Slack app

  1. Create a Slack app.

  2. On the OAuth & Permissions page, add these app scopes:

    • chat:write: Post messages as the Slack bot
    • chat:write.public: Post in public channels without being a member
    • channels:read: Look up channel IDs
  3. Install the app.

  4. Get the following app credentials:

    • Slack bot token: On the OAuth & Permissions page. Bot tokens begin with xoxb-.
    • Signing secret: From the Basic Info section.
    • The Slack channel ID: In the channel details. These IDs start with C.
  5. For private channels: To allow the app to post messages, add it to the channel. For public channels, the chat:write.public scope lets the bot post without being a member.

Enable Slack notifications in DataHub

  1. In your DataHub service, go to the DataHub resources section.

  2. Open the Aiven App that ends in -actions.

  3. In the Environment variables section, click Edit.

  4. On the Secrets tab, add the following secrets:

    KeyValue
    DATAHUB_ACTIONS_SLACK_BOT_TOKENYour Slack bot token.
    DATAHUB_ACTIONS_SLACK_SIGNING_SECRETYour signing secret.
  5. On the Variables tab, add the following variables:

    KeyValue
    DATAHUB_ACTIONS_SLACK_ENABLEDtrue
    DATAHUB_ACTIONS_SLACK_CHANNELYour Slack channel ID.
    DATAHUB_ACTIONS_SLACK_DATAHUB_BASE_URLThe DataHub Application URL from the Connection information. Adds links in messages.
    DATAHUB_ACTIONS_SLACK_SUPPRESS_SYSTEM_ACTIVITYOptional. To get low-level system activity notifications such as datasets being ingested, set to false. Defaults to true.
  6. Click Save.

After setting the variables, the actions app restarts automatically.

Related pages