Set up Slack webhook notifications

2 minute read

Create a Slack app with an incoming webhook and connect it to CloudBees Unify to send notifications to a Slack channel.

Prerequisites

Before you begin, ensure you have:

  • Admin or workspace-owner access to the target Slack workspace.

  • Administrative permissions in CloudBees Unify.

    Refer to Access organizations for navigation guidance.

Create a Slack app

  1. Navigate to api.slack.com/apps.

  2. Sign in with your Slack account if prompted.

  3. Select Create New App.

  4. In the dialog, select From scratch.

  5. Fill in the following fields:

    • App Name: Enter a name, for example Unify Notifications.

    • Pick a workspace to develop your app in: Select the target Slack workspace from the dropdown.

  6. Select Create App.

If your workspace requires admin approval for new apps, a warning displays. You can still create the app and request approval afterwards.

Enable incoming webhooks

  1. In the left sidebar of the app settings page, select Incoming Webhooks.

  2. Toggle Activate Incoming Webhooks to On.

  3. Scroll to the bottom of the app settings page and select Add New Webhook to Workspace.

  4. In the permission screen, select the Slack channel where notifications are posted, for example #unify-alerts.

  5. Select Allow.

Copy the webhook URL

After authorizing, Slack redirects you back to the Incoming Webhooks page.

  1. Locate the newly created webhook in the Webhook URLs for Your Workspace table.

  2. Select Copy next to the URL.

The URL has the following format:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Keep this URL private. Anyone with the URL can post messages to your Slack channel.

Configure the webhook in CloudBees Unify

  1. Sign in to CloudBees Unify.

  2. Select an organization, then navigate to Configurations  Notifications.

  3. Select + Create notification.

  4. In the dialog, select Slack webhook.

  5. Fill in the following fields:

    • Channel name: Enter the name of the Slack channel where notifications are posted, for example unify-alerts.

    • Description: (Optional) Enter a short description of this notification.

    • Webhook URL: Paste the URL copied in the previous step.

    • Environment: Select the target environment for this notification.

  6. Select Submit.

Troubleshoot Slack webhook notifications

If notifications are not delivered, use this guidance to identify and resolve the issue.

channel_not_found error

The channel was deleted or renamed after the webhook was created. Re-add the webhook to an existing channel in Slack.

token_revoked error

The app was uninstalled from the workspace. Reinstall the app: navigate to Slack App Settings  Install App  Reinstall.

Notifications not arriving in Slack

The wrong webhook URL was pasted in CloudBees Unify. Re-copy the URL from api.slack.com/apps, then navigate to Configurations  Notifications, edit the notification, and select Submit.

Messages posting to the wrong channel

The webhook was created for the wrong channel. Create a new webhook for the correct channel, then update the Webhook URL field in the notification configuration.