Skip to main content

Customised notification template for Pipeline

note

Currently this feature is behind Feature Flags PL_CENTRAL_NOTIFICATIONS, PIPE_CENTRALISED_NOTIFICATION and PIPE_CUSTOM_NOTIFICATION_TEMPLATES. You will need all these flags turned on to use this feature. Contact Harness Support to enable them.

Users can now create notification templates, allowing users to customize notification content and reuse templates across multiple pipelines. Templates support Pipeline Expressions, Inputs, and RBAC controls, ensuring flexibility and security.

We are going to discuss about setting up notificatio template for Pipeline at a given scope.

You can set up notification template for Pipeline at following scope: Account, Organization and Project Level.

Setting Up Notifications Template

note
  1. Custom Notification template will work only with Centralized Notifications.
  2. Custom Notification templates will work only for webhook notifications.
  3. Custom notiification templates don't support usage of template variables

YAML Structure

YAML of notification template will look like:-

template:
name: Notification_template
identifier: Notification_template
versionLabel: v1
type: Notification
projectIdentifier: Krishika_test
orgIdentifier: default
tags: {}
spec:
body:
type: JSON
content: |-
{
"pipeline name" : "<+pipeline.name>",
"stage Name" : "<+stage.name>",
"service Name" : "<+service.name>",
"status" : "<+pipeline.status>"
}
AIDA logo
AIDA logo

Harness AIDA Chatbot

AI Development Assistant


Today, March 15, 4:00am

AIDA logo

Accelerate your software delivery with the powerful capabilities of Harness’s Platform.

AIDA logo

How can I help?

Log into your Harness Account to access AIDA