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:
Create a reusable notification channel at any scope and select its connectivity mode.
Configure pipeline notifications for the pipeline events you want to track.
Identify the credentials each channel type requires, such as a webhook URL, a PagerDuty service key, or a Datadog API key.
Before you begin
Before you configure notifications, ensure you have the following:
A Harness pipeline with active delegates and connectors. You can follow the tutorial to get started with Harness Continuous Delivery (CD) to set up a sample pipeline.
These steps use Harness user groups to manage user access. If you want to follow along, create a user group named
notification-demoat the account level, and then add yourself as a user in that group.
Configure new channels
Follow the interactive walkthrough to see the flow end to end, or the next section for the step-by-step instructions.
To set up a channel, navigate to Settings in your desired scope (Account, Organization, or Project), then under Notifications and alerts, select Notification Channels.
Click New Channel and enter a Channel Name. Click Continue.

Click to view full size image The Select Connectivity Mode tab appears.
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.
Once the connectivity mode is configured, select the Channel Type and add details related to the channel type to proceed. Click Submit.
USER GROUPS REQUIRE A NOTIFICATION PREFERENCE
If you target a Harness user group instead of entering a recipient directly, the channel delivers through the channels configured in that group's Notification Preferences. When the group has no preference configured for the channel type you selected, no notification is delivered and Harness does not report an error.
Add the preference to the user group before you rely on the channel. Go to Edit notification preferences to add a channel to a user group.

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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
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.
You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
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.
You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
In Notification Method, select
Pagerduty.Create an encrypted text secret with the name
pagerdutykeyfor 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:You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
In Notification Method, select
Microsoft Teams. In Enter the Microsoft Teams Webhook URL, paste the webhook URL for your Microsoft Teams channel.You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
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.
You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
Click Submit and your notification is created.
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.
Click the Notify icon on the right side of the Harness pipeline studio.
In New Notification, add a name for your notification.
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.
In Notification Method, select
Datadog. Create an encrypted text secret with the namedatadogkeyfor 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:
You can optionally add notification templates to get custom notifications based on the event. For more information, see Custom notification templates for pipeline notifications.
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.
Click Submit and your notification is created.
When you run the pipeline, you receive notifications on the platform you set up.
Next steps
Notify users of pipeline events: Configure the notification at the receiver end and review the full list of pipeline events.
Custom notification templates: Customize the content of a notification based on the event that triggers it.
Add SMTP configuration: Configure SMTP for email-based deployment notifications, approvals, and tracking.
Last updated
Was this helpful?