Alerting & Notifications

Webhook body templates

Shape a webhook's JSON body and preview it against a sample alert.

A webhook channel can send a custom JSON body to a receiver that expects different field names. Leave Body template blank to send the standard payload.

Set and preview a template

For a Webhook channel in Create channel or Edit channel, expand Custom body template (optional). Choose ServiceNow incident, Jira issue, or Plain key-value to start from a template, or enter your own in Body template.

Adapt the receiver's fields and settings before saving. The Jira starter needs your project key and issue type; destination authentication still belongs in Custom headers (optional). A starter shapes the body; it does not configure the receiver.

Choose Preview rendered body. The read-only Rendered body uses a sample alert and shows the body size in bytes. It sends nothing to the destination. Editing the template clears the old preview. A preview error explains invalid syntax, invalid JSON, or a body over the limit. After checking it, choose Create channel or Save changes.

The template source and rendered body each have a 16 KB UTF-8 limit. Saving checks the template against a sample. Actual alert values can be longer, so a valid preview does not guarantee every delivery stays within the limit.

Clear template, followed by Save changes, restores the standard payload. The channel keeps its URL, headers, and Include resolve notifications setting. Custom bodies use the same signature headers; verify the exact received body.

Syntax

Templates support variables, sections, inverted sections, and comments. They do not run code.

SyntaxMeaning
{{alert.rule.name}}Text escaped as JSON string content. Put it inside quotes. Missing or null values render empty text.
{{{alert.triggerValue}}}A JSON literal. Use outside quotes for numbers, objects, lists, or nullable values.
{{#alert.guidance.correctiveAction}}…{{/alert.guidance.correctiveAction}}Render when the value is set. A list renders once per item; names inside resolve against the item first. {{.}} refers to that item.
{{^alert.siteName}}unknown{{/alert.siteName}}Render when the value is null, false, empty text, or an empty list. Zero counts as set.
{{! comment }}A comment omitted from the body.

Partials, lambdas, and delimiter changes are not supported. The resulting body must be valid JSON. Sections that build JSON arrays must also handle commas correctly.

{
  "title": "{{alert.rule.name}}",
  "value": {{{alert.triggerValue}}},
  "site": {{{alert.siteName}}},
  "link": "{{links.event}}"
}

Fleetera sends recovery notifications with the same template only when Include resolve notifications is on. If your receiver creates a record for every call, enabling this setting may create another record when an alert resolves. Use alert.eventId to correlate the trigger and recovery.

Variable reference

The table below is generated from the webhook payload schema. Nullable fields may be absent or null; use the JSON literal form or a section. Object fields can be rendered as a JSON literal or accessed through their dotted child paths.

VariableTypeNullable
vnumberNo
typestringNo
idstringNo
timestampstringNo
tenantIdstringNo
alertobjectNo
alert.eventIdstringNo
alert.statusstringNo
alert.severitystringNo
alert.triggeredAtstringNo
alert.resolvedAtstringYes
alert.triggerValuenumberYes
alert.thresholdnumberYes
alert.ruleobjectNo
alert.rule.idstringNo
alert.rule.namestringNo
alert.rule.typestringNo
alert.labelsobjectNo
alert.labels.assetIdstringNo
alert.labels.variableKeystringNo
alert.labels.assetNamestringYes
alert.labels.siteIdstringYes
alert.labels.assetCategoryAliasstringYes
alert.labels.connectorIdstringYes
alert.labels.unitstringYes
alert.kpiobjectYes
alert.kpi.definitionIdstringNo
alert.kpi.definitionRevisionnumberYes
alert.kpi.kpiKeystringYes
alert.kpi.windowStartstringYes
alert.kpi.windowEndstringYes
alert.externalRefslist of objectYes
alert.externalRefs.systemstringNo
alert.externalRefs.idstringNo
alert.externalRefs.urlstringNo
alert.guidanceobjectYes
alert.guidance.correctiveActionstringYes
alert.guidance.timeToRespondMinutesnumberYes
alert.siteNamestringYes
linksobjectNo
links.eventstringNo
links.kpiWindowstringYes

On this page