Variables
Every placeholder you can use in templates and header values. Free variables work for everyone; Pro variables render empty on the free tier.
Use any of these in a JSON template or a header value as {{name}}. Values are strings unless you leave the placeholder unquoted. See escaping.
Some values come from the app that posted the notification, and others from Android. If a value isn't available, for example a notification without a sub-text or a phone that doesn't report battery temperature, the placeholder renders as an empty string.
Core notification fields Free#
The default template includes seven core fields. The extra {{textPreview}} variable is available through the variable picker or by editing the template.
| Placeholder | Meaning | Example value |
|---|---|---|
{{ruleName}} | The rule's name | Bank alerts |
{{packageName}} | Source app package id | com.whatsapp |
{{appName}} | Source app label | WhatsApp |
{{title}} | Notification title | Alice |
{{text}} | Body text: the full message (newest chat message or expanded text) when the app provides it, otherwise the one-line preview | Running 5 min late |
{{textPreview}} | Collapsed one-line preview supplied by the source app; may be shortened or empty | Running 5 min... |
{{timestamp}} | When NotifyHook received the notification (ISO-8601 with offset), not the source app's original post time | 2026-11-16T09:41:07.512+01:00 |
{{notificationKey}} | Platform notification key | 0|com.whatsapp|1|null|10123 |
Time and locale Free#
| Placeholder | Meaning | Example value |
|---|---|---|
{{time.iso}} | Initial render time, ISO-8601 with offset; unchanged while queued or retried | 2026-11-16T09:41:07.630+01:00 |
{{time.epochMs}} | Initial render time, epoch milliseconds; unchanged while queued or retried | 1794818467630 |
{{time.timezone}} | Device time zone id | Europe/Madrid |
{{time.dayOfWeek}} | Day of week, in the device language | Monday |
{{locale.language}} | Device language tag | en-GB |
NotifyHook counters Free#
| Placeholder | Meaning | Example value |
|---|---|---|
{{event.uuid}} | Unique id for this delivery. Stays the same across retries, so use it as an idempotency key | 3f2a9c1e-7b4d-4e8a-9f11-2c6d5e0b8a47 |
{{event.retryCount}} | Attempt index when the body was rendered (bodies are frozen on the first attempt, so this is 0) | 0 |
{{event.sequence}} | Process-wide increasing sequence, seeded from the clock on startup; may have gaps | 1794818467631 |
{{rule.triggerCount}} | How many times this rule has fired before | 41 |
Richer notification fields Pro#
| Placeholder | Meaning | Example value |
|---|---|---|
{{notif.category}} | Android category (msg, email, call, alarm…) | msg |
{{notif.channelName}} | Notification channel name | Messages |
{{notif.priority}} | Importance (ranking) or legacy priority | 4 |
{{notif.subText}} | Sub text | alice@example.com |
{{notif.bigText}} | Expanded big text | Running 5 min late, start without me |
{{notif.summary}} | Summary text | 3 new messages |
{{notif.ticker}} | Ticker text | Alice: Running 5 min late |
{{notif.count}} | Badge number | 3 |
{{notif.progress}} | Progress value | 40 |
{{notif.progressMax}} | Progress maximum | 100 |
{{notif.color}} | Accent color as a signed ARGB int | -16733526 |
{{notif.isGroupSummary}} | Group summary flag | false |
{{notif.actionCount}} | Number of action buttons | 2 |
{{notif.postedAt}} | Despite its name, NotifyHook's receive time in epoch ms (the same instant as timestamp) | 1794818467512 |
{{notif.whenTime}} | The source notification's own when time, epoch ms; app-controlled and may be 0 | 1794818467000 |
Battery and power Pro#
| Placeholder | Meaning | Example value |
|---|---|---|
{{battery.level}} | Charge percentage | 82 |
{{battery.charging}} | Charging (or full) | true |
{{battery.source}} | AC, USB, wireless or none | USB |
{{battery.health}} | good, overheat, dead, over_voltage, cold or unknown | good |
{{battery.temp}} | Temperature in °C | 31.4 |
{{battery.voltage}} | Voltage in mV | 4123 |
{{power.saveMode}} | Battery saver on | false |
{{power.dozeMode}} | Device idle (Doze) | false |
System and phone state Pro#
| Placeholder | Meaning | Example value |
|---|---|---|
{{system.ringerMode}} | normal, vibrate or silent | vibrate |
{{system.dnd}} | Do Not Disturb: off, priority, no_interruptions, alarms or unknown | off |
{{system.screenOn}} | Screen interactive | true |
{{system.darkMode}} | Dark theme active | true |
{{system.headphones}} | Wired or Bluetooth audio output connected | false |
{{system.orientation}} | portrait or landscape | portrait |
{{device.freeStorage}} | Free storage in bytes | 48318382080 |
{{device.totalStorage}} | Total storage in bytes | 255550554112 |
{{device.freeRam}} | Available RAM in bytes | 3221225472 |
{{device.lowMemory}} | System low-memory flag | false |
{{device.uptime}} | Milliseconds since boot | 483920114 |
Device identity Pro#
Build info and the user-set device name. A device name can identify you; include it only if needed. No IMEI, serial, phone number or hardware ids.
| Placeholder | Meaning | Example value |
|---|---|---|
{{device.model}} | Model | Pixel 9 |
{{device.manufacturer}} | Manufacturer | Google |
{{device.brand}} | Brand | google |
{{device.name}} | User-set device name (falls back to model) | Sergiu's Pixel |
{{device.androidVersion}} | Android version | 16 |
{{device.sdkInt}} | SDK level | 36 |
{{app.version}} | NotifyHook version name | 1.4.0 |
Connectivity Pro#
Read with the no-prompt ACCESS_NETWORK_STATE permission. The Wi-Fi network name (SSID) is deliberately not available.
| Placeholder | Meaning | Example value |
|---|---|---|
{{network.type}} | wifi, cellular, ethernet, other or none | wifi |
{{network.metered}} | Active network is metered | false |
{{network.online}} | Active network advertises internet capability or is validated; not a reachability check for your webhook | true |
Secrets#
{{secrets.NAME}} inserts the value of a secret from the encrypted vault. It is read at send time and always redacted in the event log. See Secrets & headers.
About the counters#
{{event.uuid}}is a new random ID for each delivery. Retries keep it, so it is the best key for de-duplicating on your server.{{event.sequence}}is allocated from a process-wide increasing counter seeded from the clock on startup. It isn't a durable consecutive event number or a substitute for{{event.uuid}}. Tests and retry attempts also consume numbers, but a retry's frozen payload keeps the original, so gaps are normal.{{rule.triggerCount}}is the stored count before this match increments it. Tests and retries don't increment this rule count.{{event.retryCount}}is fixed when the body is first rendered, so it is always0. Retries resend the original body unchanged.
Which timestamp to use#
{{timestamp}} and {{notif.postedAt}} describe when NotifyHook received the callback, not the source app's original post time. {{notif.whenTime}} is the app-controlled notification time and can be zero. {{time.iso}} and {{time.epochMs}} describe the initial render, which can precede transmission by hours while offline. All are frozen on retry.
Context variables are snapshots, not triggers or live retry values. {{network.online}} reflects Android's network capabilities, not whether your webhook is reachable. Optional numeric notification extras may be 0, rather than empty, when the source app doesn't supply them.