Skip to main content
When the canonical payload doesn’t fit your receiver, paste a Handlebars template into the channel form’s Payload template field. Tallwatch renders it against the canonical variables and POSTs the result. Tallwatch uses stock Handlebars with HTML escaping turned off. You get the standard block helpers (#if, #unless, #each, #with) and nothing custom, so there’s no join, upper, or eq. The examples below stick to what’s actually available.
Test every template with Send test alert before binding the channel to real monitors. The test shows you exactly what your receiver gets.

Variables

The template runs against the same object documented on the Payload page. Use dot-notation for nested fields.

Escaping

Templates render with HTML escaping off, so {{monitor.name}} outputs the raw value. You don’t need triple-stash. The trade-off is that nothing JSON-escapes either. A value containing a " will break a templated JSON body, and there’s no built-in helper to escape it. Keep templated string fields to values you control, like a monitor name you named yourself. If a body could contain arbitrary user text with quotes, send the canonical payload instead, which is always valid JSON.

Joining an array

There’s no join helper, so iterate with #each and suppress the trailing separator with @last:
That renders fra1, iad1, sgp1.

Worked examples

Slack-compatible body

For a Slack incoming webhook with more control than the native Slack channel gives you:
Slack template

Datadog event

Push incidents into Datadog’s event stream:
Datadog template

Minimal internal alert

When your ticketing system just needs a subject and a link:
Minimal template

Status page publisher

Re-broadcast to a status-page tool that accepts a webhook:
Statuspage template

Branch by event type

There’s no string-equality helper, so don’t compare event directly. Branch on the field that distinguishes the events instead. incident.resolved_at is set only on resolve:

Troubleshooting

A template that fails to compile or render doesn’t block the alert. Tallwatch logs the error, falls back to the canonical JSON payload, and the dispatch is marked sent. So a broken template shows up as “my receiver got the default shape.” Re-test with Send test alert and fix the template.
A value in a string field contained a ", \, or control character and broke the JSON, since templates don’t escape. Keep arbitrary user text out of templated JSON string fields, or fall back to the canonical payload.
Handlebars renders a missing value as an empty string, not undefined. If you literally see the word undefined in the output, something on your receiver side is stringifying it. Check what Tallwatch sent with a test alert first.
Expected: on resolve, every region agrees the monitor is up, so the array is empty. Guard region-dependent parts:

When not to template

If your receiver accepts the canonical payload, leave the field blank:
  • One less thing to update when the payload gains a field.
  • The canonical body is always valid JSON; a template can produce broken JSON.
  • A predictable body makes the dispatch history easier to read.
Templates are an escape hatch for receivers that demand a specific shape, not a default to reach for on every channel.