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.
| Syntax | Meaning |
|---|---|
{{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.
| Variable | Type | Nullable |
|---|---|---|
v | number | No |
type | string | No |
id | string | No |
timestamp | string | No |
tenantId | string | No |
alert | object | No |
alert.eventId | string | No |
alert.status | string | No |
alert.severity | string | No |
alert.triggeredAt | string | No |
alert.resolvedAt | string | Yes |
alert.triggerValue | number | Yes |
alert.threshold | number | Yes |
alert.rule | object | No |
alert.rule.id | string | No |
alert.rule.name | string | No |
alert.rule.type | string | No |
alert.labels | object | No |
alert.labels.assetId | string | No |
alert.labels.variableKey | string | No |
alert.labels.assetName | string | Yes |
alert.labels.siteId | string | Yes |
alert.labels.assetCategoryAlias | string | Yes |
alert.labels.connectorId | string | Yes |
alert.labels.unit | string | Yes |
alert.kpi | object | Yes |
alert.kpi.definitionId | string | No |
alert.kpi.definitionRevision | number | Yes |
alert.kpi.kpiKey | string | Yes |
alert.kpi.windowStart | string | Yes |
alert.kpi.windowEnd | string | Yes |
alert.externalRefs | list of object | Yes |
alert.externalRefs.system | string | No |
alert.externalRefs.id | string | No |
alert.externalRefs.url | string | No |
alert.guidance | object | Yes |
alert.guidance.correctiveAction | string | Yes |
alert.guidance.timeToRespondMinutes | number | Yes |
alert.siteName | string | Yes |
links | object | No |
links.event | string | No |
links.kpiWindow | string | Yes |