Skip to main content
Version: v12

Notification templates

Notification templates are reusable message definitions — a subject plus an HTML and/or plain-text body — that automation actions send out. A template is authored once and then referenced by any number of Send Email, Send Slack Message, or Send Teams Message actions in your Automations and SmartFlows, so the wording, branding, and merge fields live in one place instead of being pasted into every action.

To manage notification templates, expand the Administration menu item and under Configuration, select Notification Templates. The page displays a list view of the existing templates, sorted by the date they were last updated.

Create a notification template

  1. Navigate to Administration > Configuration > Notification Templates.

  2. Click Create. The editor opens as a two-step form.

  3. On the Information step, fill in the fields:

    • Title (required): A human-readable name for the template. This is what you select when configuring an action.

    • Name (required): The internal identifier. It is generated from the Title as you type, and cannot be changed after the template is created.

    • Data model (optional): The data model whose records this template describes. See The Data model field below — this single choice determines which dynamic variables are available to you.

    • Description (optional): Notes about what the template is for.

  4. On the Message contents step, fill in the fields:

    • Subject (required): The subject line. Dynamic variables can be used here as well as in the body.

    • HTML message / Text message: Use the toggle to switch between the two body formats and author one or both. See HTML messages compared to Text messages.

  5. Click Create.

Templates can be edited, cloned, and deleted from the list view. Click the history button in the editor's header to review and restore previous revisions of a template.

The Data model field

The Data model field is optional, and it is the most consequential choice in the template. It declares what the template is about.

When you leave it empty, the template is generic. It can reference the recipient and the SmartFlow that sent it, but it knows nothing about the records that triggered the notification. A generic template is compatible with every action — use it for announcements, run summaries, and any message whose text doesn't depend on record data.

When you set it, the template becomes record-aware and the editor unlocks the record-based authoring features:

  • The Data Model and Record categories appear in the dynamic-variable picker, listing that model's attributes (and the attributes of its related models, up to three relationship levels deep).
  • The Functions aggregates (record count, sum, average, minimum, maximum) become available.
  • Insert data table (HTML) and Insert repeating section (Text) become available, so the body can render one row per record.

Setting a data model also constrains where the template can be used: a SmartFlow action only accepts a template whose data model matches the SmartFlow's own data model. If they differ, the action refuses to save and reports that the template is built for a different data model. A template with no data model is always accepted.

note

Choose the data model to match the SmartFlow the template will be used by. If you want one template to serve SmartFlows across several data models, leave the field empty and restrict the body to recipient and SmartFlow variables.

HTML messages compared to Text messages

A template holds two independent bodies, and the message-format toggle switches which one you are editing. They are not converted into each other — whatever you type in one is preserved separately from the other.

HTML messageText message
EditorRich WYSIWYG editor, with a Switch to advanced editor option for editing raw HTMLPlain textarea
FormattingHeadings, bold/italic, lists, links, colors, tablesNone — the text is delivered verbatim
ImagesSupported; embedded images are attached to the email and rendered inlineNot supported
Insert variablesInsert dynamic variable button in the editor toolbarInsert dynamic variable dropdown above the textarea
Repeating recordsInsert data table — builds a table with one row per recordInsert repeating section — builds a text block repeated per record
Used bySend EmailSend Email (fallback), Send Slack Message, Send Teams Message

Which body is sent

  • Send Email prefers the HTML message. It only falls back to the Text message when the HTML body is empty.
  • Send Slack Message and Send Teams Message read the Text message body only. They never read the HTML body.
caution

A template intended for Slack or Teams must have a Text message body. Neither platform supports HTML formatting, and a template with only an HTML body posts an empty message to the channel. If a single template needs to serve both email and chat, author both bodies.

Dynamic variables

Dynamic variables (also called merge fields) are placeholders written as ${...} that are replaced with real values when the notification is sent. Insert them with the Insert dynamic variable control rather than typing them by hand — the picker writes the correct path for you.

The picker groups variables into categories. Which categories appear, and which of them actually resolve at send time, depends on the template's data model and on how the sending action is configured.

Recipient

${recipient.firstName}, ${recipient.email}, ${recipient.roles.name}, and so on — attributes of the platform user the message is being sent to, including attributes reached through their relationships.

Available in email notifications, where each recipient receives their own copy of the message and recipient is bound to that person. Recipient variables do not resolve in Slack or Teams messages, which are posted to a channel and have no individual recipient.

SmartFlow

${smartFlow.title}, ${smartFlow.description}, ${smartFlow.dataModel}, ${smartFlow.lastUpdated}, and the two action-level fields ${smartFlowAction.title} and ${smartFlowAction.description}.

These describe the SmartFlow and the specific action node that sent the notification. They are available whenever the template is used by a SmartFlow, regardless of whether a data model is set. They do not resolve when a template is sent from something other than a SmartFlow.

Data Model

${Vulnerability.title}, ${Host.owner.email}, and so on — attributes of the selected data model, written with the data model's name as the prefix.

This category only appears once a Data model has been chosen, and what it resolves to depends on how the sending action groups its records:

  • Per-record sends (a Send Email action with no Group by attributes configured) send one email per matched record, and the data-model variables refer to that record. This is the mode where ${DataModel.attribute} is unambiguous.
  • Grouped sends (a Send Email action with Group by attributes configured) send one email per group. The data-model variables are bound to a single representative record from the group. They are only meaningful for attributes the group was grouped by — those are identical for every record in the group. Any other attribute reflects one arbitrary member of the group and should not be relied on; use a repeating section or an aggregate function instead.
  • Slack and Teams messages do not bind data-model variables at all. The whole matched set is treated as one summary, so use the Record and Functions categories instead.

Record (in repeating section)

${record.title}, ${record.severity}, and so on — the same attributes as the Data Model category, but prefixed with record instead of the data model name.

These are only valid inside a repeating section or data table, where they refer to the row currently being rendered. Outside one they do not resolve. Insert a repeating block first, then place record variables into it:

  • In an HTML message, click Insert data table, pick the attributes to use as columns, and a table is inserted with a header row and one repeating body row. Click into the table afterwards and choose Edit columns to change the selection.
  • In a Text message, click Insert repeating section to insert a block that repeats once per record, then insert record variables inside it.

Functions

Aggregate values computed across the records in scope:

FunctionInsertsNotes
Record count${agg.count()}The number of records in the group
Sum${sum()}Place a record variable between the parentheses, for example ${sum(record.cvssScore)}
Average${avg()}As above
Minimum${min()}As above
Maximum${max()}As above

Functions require a data model, and they take a record expression — ${sum(record.riskScore)} — which may be arithmetic, for example ${avg(record.score - record.baseline)}. Non-numeric and empty values are skipped.

Functions are computed over the entire set of records in scope, not just the rows the body renders. Because the number of rendered rows is capped (see Limits), ${agg.count()} can legitimately be larger than the number of rows in the table beneath it — which is exactly what makes "showing the first 25 of 312 findings" possible.

How grouping changes the picture

The same template behaves differently depending on the Send Email action's Group by attributes setting, so it is worth deciding up front which kind of template you are writing.

Per-record (no Group by)Grouped (Group by set)Slack / Teams
Messages sentOne per matched recordOne per groupOne per action run
${recipient.*}ResolvesResolvesNot available
${smartFlow.*}ResolvesResolvesResolves
${DataModel.*}The recordA representative record — trust only the group-by attributesNot available
${record.*} in a repeating blockRenders nothingOne row per record in the groupOne row per matched record
${agg.count()}, ${sum(...)}Returns 0 / emptyAcross the whole groupAcross the whole matched set

Two practical consequences:

  • A repeating section in a per-record template renders empty. Per-record sends have no group to iterate. If you want a table of records, configure Group by attributes on the Send Email action.
  • Slack and Teams always summarize. They never fan out one message per record; the entire matched set is treated as a single implicit group. A Slack or Teams template is therefore effectively always a summary template, and the sensible things to put in it are a repeating section and aggregate functions.
note

When grouping is enabled on a Send Email action, its recipient attributes must be among the group-by attributes. This guarantees the recipient is the same for every record in the group.

Limits

Record-aware sends are bounded so that a broad filter cannot generate an unbounded volume of mail. The defaults are:

LimitDefaultWhat it bounds
Records scanned for grouping5,000How many matched records are loaded and partitioned into groups
Messages per action run1,000The number of per-record emails, or the number of group emails
Rows rendered per message25How many records a repeating section or data table renders

When a limit truncates a run, the SmartFlow step completes as a partial success and the run history names what was left out. Aggregate functions always summarize the full set of records in scope, so a truncated row list still reports accurate totals. Contact Brinqa Support if these limits need to be adjusted for your environment.