---
title: "fswa_notification_message — Filter Hook"
description: "Change a rendered notification — subject, title, body, fields, link, severity — before any channel formats and sends it."
url: "https://wpwebhooks.org/docs/fswa-notification-message/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_notification\_message

Filter since v3.3.0

# fswa\_notification\_message

Change a rendered notification — subject, title, body, fields, link, severity — before any channel formats and sends it.

/ Signature

```
apply_filters( 'fswa_notification_message', $message, $rule, $ctx )
```

/ When it fires

Once per matching rule, after the template is rendered and before the message is stored for sending. Every channel on the rule receives the same filtered message, so it runs before any channel-specific formatting — add a fact, rewrite the subject, or drop the log link for a channel that cannot open the admin.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $message | param | array | yes | The rendered, channel-neutral message: \`event\`, \`event\_label\`, \`severity\` (\`success\` | \`info\` | \`warning\` | \`critical\` | \`neutral\`), \`subject\`, \`title\`, \`body\`, \`short\` (the SMS one-liner), \`fields\[\]\` (\`{label, value}\` facts), \`link\` (\`{label, url}\` to the delivery log), plus \`webhook\_id\`, \`webhook\_name\`, \`trigger\`, \`log\_id\`, \`event\_uuid\`, \`site\_name\`, \`site\_url\`, \`fired\_at\`. |
| $rule | param | array | yes | The matching rule row (\`id\`, \`name\`, \`event\`, \`webhook\_id\`, \`filters\`, \`channel\_ids\`, \`template\`, \`throttle\_seconds\`, \`digest\`). For a preview or a Send test without a saved rule it is \`\['template' => …\]\` or an empty array. |
| $ctx | param | array | yes | The delivery context, the same array \`fswa\_delivery\_event\` receives. |

/ Returns

`array` The message to send. Text values are plain text — each channel driver escapes for its own target (HTML, mrkdwn, Markdown).

/ Examples

Add the store name to every critical alert and tag the on-call engineer

```
add_filter( 'fswa_notification_message', function ( array $message, array $rule, array $ctx ) {
    if ( $message['severity'] !== 'critical' ) return $message;
    $message['title']    = '[' . get_option( 'blogname' ) . '] ' . $message['title'];
    $message['fields'][] = [ 'label' => 'On-call', 'value' => 'ops@example.com' ];
    return $message;
}, 10, 3 );
```

/ Related

[Notifications](https://wpwebhooks.org/docs/notifications/)[fswa\_delivery\_event](https://wpwebhooks.org/docs/fswa-delivery-event/)[fswa\_notification\_channel\_drivers](https://wpwebhooks.org/docs/fswa-notification-channel-drivers/)[fswa\_notification\_http\_args](https://wpwebhooks.org/docs/fswa-notification-http-args/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://downloads.wordpress.org/plugin/flowsystems-webhook-actions.zip) [Try the Live Preview](https://playground.wordpress.net/?blueprint-url=https://wpwebhooks.org/blueprint.json) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_notification_message — Filter Hook — Webhook Actions Docs","description":"Change a rendered notification — subject, title, body, fields, link, severity — before any channel formats and sends it.","url":"https://wpwebhooks.org/docs/fswa-notification-message/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
