NotifyHookDocs
Configuring rules

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.

Availability depends on the device

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.

PlaceholderMeaningExample value
{{ruleName}}The rule's nameBank alerts
{{packageName}}Source app package idcom.whatsapp
{{appName}}Source app labelWhatsApp
{{title}}Notification titleAlice
{{text}}Body text: the full message (newest chat message or expanded text) when the app provides it, otherwise the one-line previewRunning 5 min late
{{textPreview}}Collapsed one-line preview supplied by the source app; may be shortened or emptyRunning 5 min...
{{timestamp}}When NotifyHook received the notification (ISO-8601 with offset), not the source app's original post time2026-11-16T09:41:07.512+01:00
{{notificationKey}}Platform notification key0|com.whatsapp|1|null|10123

Time and locale Free#

PlaceholderMeaningExample value
{{time.iso}}Initial render time, ISO-8601 with offset; unchanged while queued or retried2026-11-16T09:41:07.630+01:00
{{time.epochMs}}Initial render time, epoch milliseconds; unchanged while queued or retried1794818467630
{{time.timezone}}Device time zone idEurope/Madrid
{{time.dayOfWeek}}Day of week, in the device languageMonday
{{locale.language}}Device language tagen-GB

NotifyHook counters Free#

PlaceholderMeaningExample value
{{event.uuid}}Unique id for this delivery. Stays the same across retries, so use it as an idempotency key3f2a9c1e-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 gaps1794818467631
{{rule.triggerCount}}How many times this rule has fired before41

Richer notification fields Pro#

PlaceholderMeaningExample value
{{notif.category}}Android category (msg, email, call, alarm…)msg
{{notif.channelName}}Notification channel nameMessages
{{notif.priority}}Importance (ranking) or legacy priority4
{{notif.subText}}Sub textalice@example.com
{{notif.bigText}}Expanded big textRunning 5 min late, start without me
{{notif.summary}}Summary text3 new messages
{{notif.ticker}}Ticker textAlice: Running 5 min late
{{notif.count}}Badge number3
{{notif.progress}}Progress value40
{{notif.progressMax}}Progress maximum100
{{notif.color}}Accent color as a signed ARGB int-16733526
{{notif.isGroupSummary}}Group summary flagfalse
{{notif.actionCount}}Number of action buttons2
{{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 01794818467000

Battery and power Pro#

PlaceholderMeaningExample value
{{battery.level}}Charge percentage82
{{battery.charging}}Charging (or full)true
{{battery.source}}AC, USB, wireless or noneUSB
{{battery.health}}good, overheat, dead, over_voltage, cold or unknowngood
{{battery.temp}}Temperature in °C31.4
{{battery.voltage}}Voltage in mV4123
{{power.saveMode}}Battery saver onfalse
{{power.dozeMode}}Device idle (Doze)false

System and phone state Pro#

PlaceholderMeaningExample value
{{system.ringerMode}}normal, vibrate or silentvibrate
{{system.dnd}}Do Not Disturb: off, priority, no_interruptions, alarms or unknownoff
{{system.screenOn}}Screen interactivetrue
{{system.darkMode}}Dark theme activetrue
{{system.headphones}}Wired or Bluetooth audio output connectedfalse
{{system.orientation}}portrait or landscapeportrait
{{device.freeStorage}}Free storage in bytes48318382080
{{device.totalStorage}}Total storage in bytes255550554112
{{device.freeRam}}Available RAM in bytes3221225472
{{device.lowMemory}}System low-memory flagfalse
{{device.uptime}}Milliseconds since boot483920114

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.

PlaceholderMeaningExample value
{{device.model}}ModelPixel 9
{{device.manufacturer}}ManufacturerGoogle
{{device.brand}}Brandgoogle
{{device.name}}User-set device name (falls back to model)Sergiu's Pixel
{{device.androidVersion}}Android version16
{{device.sdkInt}}SDK level36
{{app.version}}NotifyHook version name1.4.0

Connectivity Pro#

Read with the no-prompt ACCESS_NETWORK_STATE permission. The Wi-Fi network name (SSID) is deliberately not available.

PlaceholderMeaningExample value
{{network.type}}wifi, cellular, ethernet, other or nonewifi
{{network.metered}}Active network is meteredfalse
{{network.online}}Active network advertises internet capability or is validated; not a reachability check for your webhooktrue

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 always 0. 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.