Create and Manage Templates
This guide walks you through the complete workflow of creating, configuring, and managing notification templates in Collate.Creating a Custom Template
Use the steps below to create a new notification template.- Navigate to Settings > Notifications > Notification Templates
- Click Create Template button.
- A form will appear with fields for defining your template.
Alternative Path: Creating Templates While Creating a Notification
Notification templates can also be created directly during the creation of a new notification subscription:- Navigate to Settings > Notifications > Alerts.
- Click Add Alert.
- In the notification creation form, a Create Template option will be available.
- You may:
- Create a new custom template on the spot, or
- Select an existing template.
- If no template is created or selected, the system default template will be applied.
- Once the notification is saved, the created template is automatically linked and will be used for that notification.
Filling in Template Details
Name (Required)
A unique identifier for the template used internally. Example:high-priority-alerts, test-failure-notification, schema-change-alerts
- Use lowercase with hyphens for clarity
- Keep it concise and descriptive
Description (Optional)
Document when and why this template should be used. Example:Send notifications when critical test cases fail. Used with real-time test subscriptions.
Subject (Required)
The email subject line or notification title. Constraints: Maximum 255 characters Example:[Data Alerts] - Table Updated: database.schema.customers
The subject uses the same placeholders and helpers as the body. It is plain text, so don’t add HTML tags. To keep a & in a name from showing as &, use triple braces: {{{entity.name}}}.
Body (Required)
The main template content in HTML with Handlebars. Constraints: Maximum 65,536 characters Example:Save the Template
- Review all fields for accuracy
- Click Save button.
- The template is now available for use in event subscriptions
Modifying Templates
Editing User Templates
User templates (those you created) can be fully edited:- Navigate to Settings > Notifications > Templates
- Find the template in the list
- Click the Edit button
- Modify any fields (Name, Display Name, Description, Subject, Body)
- Click Save
Editing System Templates
System templates (pre-built by Collate) can be partially edited:- You can modify: Subject and Body
- You cannot modify: Name and Display Name
- System templates track if you’ve customized them
Linking Templates to Event Subscriptions
Templates become useful when connected to event subscriptions. Here’s how to use them:Step 1: Navigate to Subscriptions
- Go to Settings > Notifications > Subscriptions
- Create a new subscription or edit an existing one
Step 2: Select a Template
- In the subscription form, find the Notification Template dropdown
- Choose from:
- System Templates - Pre-built templates for common entity types
- User Templates - Custom templates you’ve created
- (blank) - Use default formatting per channel
Step 3: Configure Other Settings
Complete the rest of the subscription setup:- Event Type - Which changes trigger the notification
- Destinations - Where to send notifications (email, Slack, Teams, etc.)
- Filters - Optional conditions for when to send
Step 4: Save the Subscription
Your template is now active and will be used for all notifications from this subscription.Show Failed Rows in a Data Quality Alert
Test case alerts use the default Entity Updated Notification template. There is no separate data quality template. The default template already shows the failed row count and a table of failed rows, so if your alert uses it, steps 1 to 3 below are all you need. Step 4 is only for alerts that use a custom template. To show failed rows in an alert:- In the test settings, turn on Compute Row Count. The failed row count and sample aren’t available when this option is off. The Compare 2 tables for differences test is the exception: it collects a sample whenever it fails.
-
Check that the test type collects a sample. Only these tests do:
- Column Values To Be Between
- Column Values To Be In Set
- Column Values To Be Not In Set
- Column Values To Be Not Null
- Column Values To Be Unique
- Column Values To Match Regex Pattern
- Column Values To Not Match Regex
- Column Value Lengths To Be Between
- Custom SQL Query
- Compare 2 tables for differences
- Under Settings > Preferences > Profiler Configuration, check that Enable Storing of Sample Data is on. It’s on by default. When it’s off, no sample is collected.
- If your alert uses a custom template, add the snippet below to the template body.
- Run a test that fails.
- In the resulting notification, confirm that the failed row count and sample table appear.
PII.Sensitive in the sample. If the table has the PII.Sensitive tag, Collate masks every column.
A test notification uses generated data without a failed result or failed-row sample, so the test case section stays empty. To view this section, run a test that fails and inspect the actual notification.
The editor suggestions that appear after you enter {{ list the basic Handlebars blocks (if, each, with, unless), the custom helpers with an example of each, and the event, entity, baseUrl, publisherName, and emailingEntity placeholders. For more information, see the Custom Helpers Reference.
Reacting to a Data Contract Status Change
A data contract has an approval status inentity.entityStatus. The values are Draft, In Review, Approved, Archived, Deprecated, Rejected, and Unprocessed. When the status changes, the change event records it under the field name entityStatus.
To show a message only when the status changed, group the changes and check for that field:
{{buildEntityUrl event.entityType entity}} to link to the contract.
A change to
entityStatus appears only on update events. A create event has no list of changes, and soft-delete and restore events list only the deleted field.A template changes only what the notification shows. It can’t stop the alert from firing. A data contract alert can’t currently filter on the approval status (
entityStatus). The only status filter for data contracts, Get Data Contract Status Updates, checks the validation result (such as Failed or Aborted), not the approval status. An alert on data contracts therefore sends a notification for every matching contract change, not only for status changes.Template Validation and Testing
Validating Templates
Before you save a template, click Validate in the template editor. Validation checks the Handlebars syntax. It doesn’t check whether a placeholder exists, so a misspelled placeholder passes validation and renders as empty text.Sending Test Notifications
Send a test from the alert form, not from the template editor:- Open or create an alert, and select a source.
- Add at least one external destination, such as Email, Slack, MS Teams, or Google Chat.
- Under Notification Template, select a saved template or Create Custom Template. Test Template isn’t available for System Default Template.
- Click Test Template.
- Check your destinations to verify formatting and content.
Modifying vs. Duplicating Templates
When to Modify
Modify a template when you want to update all existing subscriptions using it:- Impact: All active subscriptions using this template immediately get new formatting
- Use when: Improving a template everyone already uses
When to Duplicate
Create a new template based on an existing one when:- You want a variation for a specific use case
- You want to test changes before affecting production subscriptions
- Different teams need different formatting
- Copy the template content
- Create a new template
- Paste the content as a starting point
- Modify as needed
Deleting Templates
Delete User Templates
You can safely delete user templates you created:- Go to Settings > Notifications > Templates
- Find your template
- Click the Delete button
- Confirm the deletion
System Templates
System templates cannot be deleted (they’re read-only by default). If you’ve customized a system template and want to revert to the original, click Restore. After restoring, the template will once again stay synchronized with the Collate-provided system default (unless you modify it manually).Troubleshooting Template Issues
Template Won’t Save
Common causes:- Body exceeds 65,536 characters - simplify the content
- Subject exceeds 255 characters - shorten the subject
- Invalid Handlebars syntax - check brackets are balanced
- Required fields are empty - fill in Name, Display Name, Subject, and Body
Notifications Not Using Template
Check:- Is the template selected in the subscription settings?
- Is the subscription active?
- For system templates, do the subscription’s event type and entity type match your template name?
Template Shows Wrong Data
Check:- Are you using the correct property names? See Template Context Reference
- Is the data available for this entity type?
- Are you using conditionals for optional fields?
Next Steps
- Learn about available data → Template Context Reference
- Master Handlebars → Handlebars Templating Guide
- Get help with issues → Troubleshooting Guide