Skip to main content

Customised notification template for Pipeline

note

Currently this feature is behind Feature Flag: PIPE_CUSTOM_NOTIFICATION_TEMPLATES However, since this is supported for centralised notification, we need PL_CENTRAL_NOTIFICATIONS and PIPE_CENTRALISED_NOTIFICATION to be enabled first.

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

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

You can set up a notification template for a Pipeline at the following scopes: 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 Notification templates don't support usage of template variables.

YAML Structure

YAML of notification template will look like:-

note

You can choose text type for your content body as HTML, JSON, YAML or String.

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" : "deploy_azure_function",
"status" : "<+pipeline.status>"
}