You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.mdx
+41-2Lines changed: 41 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -625,8 +625,47 @@ A Trigger defines actions to take when monitored conditions are met. Triggers ca
625
625
|`**config.secret.type**`|`String`| Secret type (**"Plain"**, **"Environment"**, or **"HashicorpCloudVault"**) |
626
626
|`**config.secret.value**`|`String`| Secret value (HMAC secret, environment variable name, or vault secret name) |
627
627
|`**config.headers**`|`Object`| Headers to include in the webhook request |
628
-
|`**config.message.title**`|`String`| Title that appears in the webhook message |
629
-
|`**config.message.body**`|`String`| Message template with variable substitution |
628
+
|`**config.payload_mode**`|`String`| Payload mode: **"template"** (default) or **"raw"**|
629
+
|`**config.message.title**`|`String`| Title that appears in the webhook message (required for template mode) |
630
+
|`**config.message.body**`|`String`| Message template with variable substitution (required for template mode) |
631
+
632
+
##### Webhook Payload Modes
633
+
634
+
Webhooks support two payload modes that determine how data is sent to your endpoint:
635
+
636
+
**Template Mode (default)**
637
+
638
+
In template mode, the webhook sends a formatted JSON payload with `title` and `body` fields, where variables are substituted from the monitor match data:
639
+
640
+
```json
641
+
{
642
+
"title": "Monitor Alert triggered",
643
+
"body": "Large transfer detected from 0x123... to 0x456..."
644
+
}
645
+
```
646
+
647
+
**Raw Mode**
648
+
649
+
In raw mode, the webhook sends the complete `MonitorMatch` object directly as the JSON payload. This is useful when you want to receive all blockchain event data without formatting, allowing your receiving service to process the raw data as needed.
* The payload contains the full monitor match including: monitor configuration, transaction details, receipt, logs, matched conditions, and decoded arguments
668
+
* This is particularly useful for integrations that need to process the complete event data programmatically
Copy file name to clipboardExpand all lines: examples/config/triggers/webhook_notifications.json
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,5 +64,24 @@
64
64
"body": "${monitor.name} triggered because of a large swap of ${functions.0.args.out_min} tokens | https://stellar.expert/explorer/public/tx/${transaction.hash}"
0 commit comments