For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configure notifications

Configure notification channels and pipeline notifications for Slack, Microsoft Teams, email, webhooks, PagerDuty, and Datadog.

Notifications keep your teams informed about pipeline events such as start, success, failure, and pause. You can create a reusable notification channel at the scope you need, then attach notifications to a pipeline so that the relevant people are alerted through Slack, Microsoft Teams, email, webhooks, PagerDuty, or Datadog.


What you will learn in this topic

By the end of this topic, you will be able to:


Before you begin

Before you configure notifications, ensure you have the following:


Configure new channels

Follow the interactive walkthrough to see the flow end to end, or the next section for the step-by-step instructions.

  1. To set up a channel, navigate to Settings in your desired scope (Account, Organization, or Project), then under Notifications and alerts, select Notification Channels.

  2. Click New Channel and enter a Channel Name. Click Continue.

    Click to view full size image

    The Select Connectivity Mode tab appears.

  3. Select a Connectivity Mode. You can send notifications directly through the Harness Platform or through a Harness Delegate. Click Continue.

    The Notification Method tab appears.

  4. Once the connectivity mode is configured, select the Channel Type and add details related to the channel type to proceed. Click Submit.

    If you select the Connectivity Mode as "Connect through a Harness Delegate" and Channel Type as "Email", add a Simple Mail Transfer Protocol (SMTP) configuration to which the Harness delegate has access. If this is not done, then the email notifications fail.

    Click to view full size image

The channel is now available at the scope where you created it, and you can reference it when you configure pipeline notifications.


Configure pipeline notifications

When you configure pipeline notifications, you select the Pipeline Events that trigger the notification. Available pipeline-level events include start, end, success, failure, pause, and Waiting for User Action. The Waiting for User Action event fires whenever a pipeline pauses because it needs user input, such as an Approval step, Manual Intervention, or runtime execution input. For the full list of events and their behavior, see Add a pipeline notification strategy.

Select the tab for the channel type you want to use. Each channel type requires different delivery details.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Email. For email notifications, enter the email addresses that you want to notify.

    • Enter multiple addresses as a comma-separated list. For example, john.doe@example.io,qateam@example.io.

    • You can also use the user group that you created above to receive notifications.

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

To configure Slack notifications, you need to create a Slack webhook. For more information, see the sending messages using incoming webhooks tutorial provided by Slack. Copy and store the webhook URL for use in Harness.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Slack.

    • Paste the webhook in Slack Webhook URL. Harness recommends that you add the webhook as an encrypted text secret and reference it in Slack Webhook URL as an expression, such as <+secrets.getValue("slackwebhookURL")>.

    • You can also use the user group created above, if it is associated with the Slack channels to send notifications. For more information, see Notify Slack channels in user groups.

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

To configure PagerDuty notifications, you need a PagerDuty service key to integrate with Harness. Copy or store this key from PagerDuty's Configuration > Services > Service Details dialog > Integrations tab.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Pagerduty.

    • Create an encrypted text secret with the name pagerdutykey for the PagerDuty service you created above, and reference it in PagerDuty Key using an expression. Harness sends notifications using this key.

    For example, you can reference a secret within the Organization scope using an expression with org:

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

In Microsoft Teams, you can use webhook notifications to inform an external application of a pipeline or stage event.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Microsoft Teams. In Enter the Microsoft Teams Webhook URL, paste the webhook URL for your Microsoft Teams channel.

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

In Harness you can use webhook notifications to inform an external application of a pipeline or stage event.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Webhook. In Enter the URL to be called, use expressions to compose the URL to be called when the event occurs. For example, https://companyurl.notify.com/execution=-<+pipeline.executionId>.

    • The webhook call is made as a POST request, and includes a JavaScript Object Notation (JSON) object containing the properties of the triggered event.

    • The expression must be evaluated in the context of the event. For example, stage-related expressions might not be valid for pipeline start events.

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

Currently, the Datadog notifications feature is behind the feature flag PIPE_DATADOG_NOTIFICATIONS. Contact Harness Support to enable this feature.

To configure Datadog notifications, you need a Datadog API key to integrate with Harness. Copy or store this key from Datadog's Configuration > API Keys > API Key Details dialog > Integrations tab.

  1. Click the Notify icon on the right side of the Harness pipeline studio.

  2. In New Notification, add a name for your notification.

  3. In Pipeline Events, select the events (pipeline or stages) that trigger the notification.

    • For stage-based events, select the stage name that you want to trigger the notification and click Next.

  4. In Notification Method, select Datadog. Create an encrypted text secret with the name datadogkey for the Datadog service you created above, and reference it in Datadog Key using an expression. Harness sends notifications using this key.

    • For example, you can reference a secret within the Organization scope using an expression with org:

  5. You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.

  6. Select the Connectivity Mode.

    • Connect through Harness Platform to send notifications.

    • Connect through Harness Delegate to send notifications.

      • Select the delegate that you want to use to send notifications.

  7. Click Submit and your notification is created.

When you run the pipeline, you receive notifications on the platform you set up.


Next steps

Last updated

Was this helpful?