This commit is contained in:
jokob-sk
2025-02-09 10:57:02 +11:00
parent cd8124a912
commit 0fe903e076
41 changed files with 424 additions and 271 deletions

View File

@@ -2,11 +2,11 @@
N8N can be used for more advanced conditional notification use cases. For example, you want only to get notified if two out of a specified list of devices is down. Or you can use other plugins to process the notifiations further. The below is a simple example of sending an email on a webhook.
![n8n workflow](/docs/img/WEBHOOK_N8N/n8n_workflow.png)
![n8n workflow](./img/WEBHOOK_N8N/n8n_workflow.png)
### Specify your email template
See [sample JSON](https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json) if you want to see the JSON paths used in the email template below
![Email template](/docs/img/WEBHOOK_N8N/n8n_send_email_settings.png)
![Email template](./img/WEBHOOK_N8N/n8n_send_email_settings.png)
```
Events count: {{ $json["body"]["attachments"][0]["text"]["events"].length }}
@@ -14,7 +14,7 @@ New devices count: {{ $json["body"]["attachments"][0]["text"]["new_devices"].len
```
### Get your webhook in n8n
![n8n webhook URL](/docs/img/WEBHOOK_N8N/n8n_webhook_settings.png)
![n8n webhook URL](./img/WEBHOOK_N8N/n8n_webhook_settings.png)
### Configure NetAlertX to point to the above URL
![NetAlertX config](/docs/img/WEBHOOK_N8N/Webhook_settings.png)
![NetAlertX config](./img/WEBHOOK_N8N/Webhook_settings.png)