Rules & filters
A rule decides which notifications are forwarded, where they go and what the request looks like.
A rule has three parts: which notifications (source apps and filters), where they go (webhook URL, headers, signing secret), and what is sent (the JSON template). You can have as many rules as you like. Each rule checks every notification separately.
Rule fields#
| Field | What it does |
|---|---|
| Rule name | Shown in the app and sent as {{ruleName}}. A blank name is saved as Untitled rule. |
| Webhook URL | Where the POST goes. Must start with https://. Required. |
| Custom headers | Extra request headers, for example Authorization. Values can use placeholders and secrets. |
| HMAC SHA-256 signing secret | Optional. Adds an X-NotifyHook-Signature header. See Verifying signatures. |
| Source apps | The apps this rule listens to. At least one is needed. |
| Filters | Optional keyword filters on title and text. |
| Include in payload / JSON template | The request body. See Payload templates. |
Source apps#
Tap + add app to pick installed apps. A rule only sees notifications from the apps you pick. A rule with no source apps matches nothing. There is no "all apps" option on purpose, so you never forward more than you meant to.
The picker combines apps with a launcher icon and apps NotifyHook has observed posting notifications. For an app with no launcher icon, grant Notification Access, let it post a notification, then reopen the rule editor. Settings → Diagnostics shows the posting package, for example com.google.android.apps.messaging.
Filters#
Filters narrow down which notifications from the source apps are forwarded. There are three keyword lists:
| Filter | Forward only if… |
|---|---|
| Title contains | the title contains at least one of these keywords |
| Text contains | the text contains at least one of these keywords |
| Exclude keywords | none of these appear in the title or the text |
How they combine:
- An empty list doesn't filter anything.
- Inside one list, keywords are OR: any one is enough.
- Between lists, conditions are AND: if both Title contains and Text contains have keywords, both must match.
- Exclude runs last and always wins.
- Matching is case-insensitive and finds the keyword anywhere, so
otpalso matches "Your OTP code" and "hotpot". - Text contains and exclusions use the full
{{text}}, not just the collapsed{{textPreview}}. Filters are literal substrings, not regular expressions or whole-word matches.
Examples#
| Goal | Title contains | Text contains | Exclude |
|---|---|---|---|
| Card payments only | payment, charged | declined | |
| Messages from one person | Alex | ||
| Delivery updates, no ads | delivered, out for delivery | offer, % |
What gets skipped automatically#
- Group summaries, the empty "stack" headers that apps post next to a group of notifications, are always ignored and not logged.
- Ongoing notifications such as music players, navigation, timers or uploads are skipped unless Include ongoing notifications is on.
- Already-recorded delivery keys. The app checks the rule, notification key and receive timestamp against retained events. This isn't content-based duplicate suppression: notification updates or repeated callbacks can produce new deliveries.
- Notifications posted by NotifyHook itself.
Anything dropped by your filters or the ongoing setting is shown in the Event log as SKIPPED with the reason.
Enabling, disabling and testing#
Each rule card on the Rules screen has a switch. While a rule is disabled it matches nothing, and deliveries it already queued wait with the reason "Rule disabled". In the rule editor, ⋮ → Test webhook sends its template filled with sample data, without waiting for a real notification. The same menu has Duplicate and Delete. If you delete a rule, its pending deliveries are marked failed with "Rule deleted".
Save a new rule before testing; its action menu appears only after it has an ID. A test uses the current editor configuration and bypasses source-app and keyword matching, but still respects pause, enabled-state and network restrictions. Save signing-secret changes before testing: tests use the stored per-rule HMAC key, not an unsaved replacement.
Duplicating saves a new rule named (copy), copies the signing key and keeps references to the same shared named secrets. If both copies stay enabled, both can forward the same notification. Disabling a rule doesn't erase its queued deliveries; deleting one stops them when the queue next checks them.