n8n updated example + formating

This commit is contained in:
Jokob-sk
2023-02-01 20:40:14 +11:00
parent 7ea74d0fe3
commit eec0dcca82
3 changed files with 3 additions and 3 deletions

View File

@@ -2358,7 +2358,7 @@ def construct_notifications(sqlQuery, tableTitle, skipText = False, suppliedJson
html = convert(json, build_direction=build_direction, table_attributes=table_attributes) html = convert(json, build_direction=build_direction, table_attributes=table_attributes)
html = format_table(html, "data", headerProps, tableTitle) html = format_table(html, "data", headerProps, tableTitle).replace('<ul>','<ul style="list-style:none;padding-left:0">')
headers = json_struc.columnNames headers = json_struc.columnNames

View File

@@ -7,8 +7,8 @@ See [sample JSON](https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_js
![Email template](/docs/img/WEBHOOK_N8N/n8n_send_email_settings.png) ![Email template](/docs/img/WEBHOOK_N8N/n8n_send_email_settings.png)
``` ```
{{$json["body"]["attachments"][0]["text"]["new_devices"]}} Events count: {{ $json["body"]["attachments"][0]["text"]["events"].length }}
{{$json["body"]["attachments"][0]["text"]["events"]}} New devices count: {{ $json["body"]["attachments"][0]["text"]["new_devices"].length }}
``` ```
### Get your webhook in n8n ### Get your webhook in n8n

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 38 KiB