Default Notification Template
Set default notification templates at any scope to ensure consistent notifications for pipeline events across all channels.
Default notification templates apply automatically when a notification rule does not specify a template of its own. Use them to keep notification content consistent and complete across every rule without selecting a template each time you create one.
You configure default templates at the Account, Organization, or Project scope, and separately for each event type and channel type, so you control notification content at the granularity you need.
What you will learn in this topic
By the end of this topic, you will be able to:
Watch an interactive walkthrough of the end-to-end setup.
Navigate to the default template sets page at the scope you want to configure.
Create a default template set with a name, description, and tags.
Configure the resource and channel type that the template set applies to.
Define event and template combinations for each pipeline event you want to cover.
Trace the template selection priority that Harness follows when it resolves a template at runtime.
Before you begin
Before you configure a default notification template, ensure you have the following:
Feature flag enablement: The
PL_DEFAULT_NOTIFICATION_TEMPLATE_SET_SUPPORTfeature flag enabled on your account.Harness account access: Permissions to view and edit notification settings at the target scope. For more information, see RBAC in Harness.
Target scope access: Access to the Account, Organization, or Project where the defaults apply.
Notification templates: At least one notification template available at or above that scope.
Watch an interactive walkthrough
Step through the walkthrough to see the full flow before you configure your own set. The example sets up a default email notification template for pipeline events at the Account scope.
Step 1: Navigate to the default template sets page
Start at the scope where you want the defaults to apply, because a default template set is scoped to the Account, Organization, or Project you create it in.
Navigate to Settings at your desired scope (Account, Organization, or Project).
In the Notifications and alerts section, select Default Template Sets.
Step 2: Create a default template set
Create a template set to group the event and template combinations that share a single resource type and channel type.
Click + Default Template Set.
In Overview, enter a name for the template set, then add an optional description and tags.
Click Continue.

Click to view full size image
Step 3: Configure the resource and channel type
The resource type and channel type together determine which notifications the set applies to, so set them before you map events to templates.
Resource Type: Automatically set to Pipeline, currently the only supported resource.

Click to view full size image Channel Type: Select one from the dropdown, then click Continue.

Click to view full size image
Step 4: Define event and template combinations
Map each pipeline event to the template you want Harness to use when a rule for that event does not name a template.
Select one or more pipeline events from the Select Pipeline Events dropdown.

Click to view full size image Click Select Template, then select the template to serve as the default for the selected event type. If the template includes runtime input variables, provide the required values. Repeat this process for additional event and template combinations as needed.
Click Submit. The template set appears on the Default Template Sets page with a summary of the configured events and templates.

Click to view full size image
Template selection priority
More than one template can match the same event and channel type combination. Use the priority order below to predict which template a notification uses, or to explain one that arrives with unexpected content.
Harness resolves each event and channel type combination in this order:
Template selected in notification rule: If you specify a template when you create or edit a notification rule, Harness uses that template.
Default template by scope: If the rule specifies no template, Harness searches for default templates starting at the current scope and moving up the hierarchy: Project, then Organization, then Account.
Built-in template: If no custom or default templates are available, Harness uses the built-in static template.
This hierarchy sends notifications with appropriate content even when no specific template is configured.
Examples of template selection priority
The following examples show how the priority order resolves in different scenarios, from basic to more advanced use cases.
Related articles
Custom notification templates for pipeline notifications: Create the templates that a default template set references.
Centralised notification: Configure the notification rules that consume default templates.
Notifications: Enable and manage notification channels at the account level.
Configure notifications: Set up pipeline notifications for Slack, Microsoft Teams, email, and webhooks.
Last updated
Was this helpful?