> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/send-notifications-using-slack.md).

# Send notifications using Slack

This topic explains how to send user group notifications using slack.

You can notify your User Group members using Slack as one of the notification channels. Add a Slack Incoming Webhook into your Harness User Groups' [Notification Preferences](/harness-ai/use-harness-platform/platform-access-control/add-user-groups.md#edit-notification-preferences).

Then add your User Group to a Notification Strategy and receive alert info in Slack.

## Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

Before you configure notifications using Slack, ensure you have the following:

* [User Group Notification Preferences](/harness-ai/use-harness-platform/platform-access-control/add-user-groups.md#edit-notification-preferences): Configure notification channels for Harness to send messages to group members.

#### Visual summary <a href="#visual-summary" id="visual-summary"></a>

Adding a Slack channel to your Harness User Groups **Notification Preferences** is as simple as pasting in a Slack Webhook:

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-a399c5cafce7184f261aac1332a9eb96b0fc02d2%2Fsend-notifications-using-slack-16.png?alt=media)

## Step 1: Create a Slack app and webhook for your channel <a href="#step-1-create-a-slack-app-and-webhook-for-your-channel" id="step-1-create-a-slack-app-and-webhook-for-your-channel"></a>

Follow the steps in [Slack documentation](https://api.slack.com/messaging/webhooks) for creating a Slack app, selecting your channel, and creating a webhook.

When you are done, you will have a webhook that looks something like this:

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-70856351ad5e1f5e1e027ea2594b45badd5af388%2Fsend-notifications-using-slack-17.png?alt=media) Copy the Webhook.

## Step 2: Add the webhook to the User Group Notification Preferences <a href="#step-2-add-the-webhook-to-the-user-group-notification-preferences" id="step-2-add-the-webhook-to-the-user-group-notification-preferences"></a>

To finish the setup, add the webhook to your Harness user group so it receives Slack notifications:

1. In your **Account**/**Organization**/**Project** click Access Control.
2. Click **User Groups**.
3. Select the User Group to which you want to add notification preferences.
4. In **Notification Preferences**, select **Slack Webhook URL**.
5. Paste the Webhook into **Slack Webhook URL** or add it as an [Encrypted Text](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) in Harness and reference it here.\
   For example, if you have a text secret with the identifier slackwebhookURL, you can reference it like this:

```shell
<+secrets.getValue("slackwebhookURL")>​​
```

You can reference a secret within the Org scope using an expression with `org`:​

```shell
<+secrets.getValue("org.your-secret-Id")>​
```

You can reference a secret within the Account scope using an expression with `account`:​

```shell
<+secrets.getValue("account.your-secret-Id")>​
```

6. Click **Save**.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-a399c5cafce7184f261aac1332a9eb96b0fc02d2%2Fsend-notifications-using-slack-16.png?alt=media)

Now your Slack channel will be used to notify this User Group of alerts.

## Next steps <a href="#next-steps" id="next-steps"></a>

* [Notifications](/harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/notifications-overview.md): Learn about other supported notification channels.
* [Configure notifications](/harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/configure-notifications.md): Set up pipeline-level notification rules.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/send-notifications-using-slack" %}
