Change

Time
2026-05-31 19:48:21
User
York-Simon Johannsen (YoSiJo)
Action
Updated
Object type
Extras | webhook
Object
Message
Request ID

Difference

{
    "body_template": "{%- set ns = namespace(has_failures=false, error_lines=[]) -%}\r\n\r\n{# 1. Suche in NetBox v4 Report-Tests #}\r\n{%- if data.tests -%}\r\n  {%- for test_name, test_results in data.tests.items() -%}\r\n    {%- if test_results.failure -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set msg = \"- [\" ~ test_name ~ \"] \" ~ test_results.failure -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 2. Fallback fuer klassische Script-Logs #}\r\n{%- if data.result and data.result.log -%}\r\n  {%- for log in data.result.log -%}\r\n    {%- if log.status == 'failure' or log.status == 'failed' -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set type = log.obj_type if log.obj_type else 'Allgemein' -%}\r\n      {%- set msg = \"- [\" ~ type ~ \"] \" ~ log.message -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 3. Nur JSON ausgeben, wenn wirklich Fehler existieren #}\r\n{%- if ns.has_failures -%}\r\n{\r\n  \"urls\": \"xmpps://netbox:{{ '' | xmpp_apprise_password }}@anoxinon.me/yosijo\",\r\n  \"title\": \"❌ NetBox Report: Fehlgeschlagene Checks in {{ data.script }}\",\r\n  \"body\": {{ (\"Der Report \" ~ data.script ~ \" wurde von \" ~ username ~ \" ausgefuehrt.\\n\\nFolgende Checks sind fehlgeschlagen:\\n\" ~ ns.error_lines | join(\"\\n\")) | toJson }}\r\n}\r\n{%- else -%}\r\n{# Absichtlich komplett leerer Block, NetBox bricht den HTTP-Call ab, wenn kein JSON-Anfang '{' existiert #}\r\n{%- endif -%}"
}
{
    "body_template": "{%- set ns = namespace(has_failures=false, error_lines=[]) -%}\r\n\r\n{# 1. Suche in NetBox v4 Report-Tests #}\r\n{%- if data.tests -%}\r\n  {%- for test_name, test_results in data.tests.items() -%}\r\n    {%- if test_results.failure -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set msg = \"- [\" ~ test_name ~ \"] \" ~ test_results.failure -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 2. Fallback fuer klassische Script-Logs #}\r\n{%- if data.result and data.result.log -%}\r\n  {%- for log in data.result.log -%}\r\n    {%- if log.status == 'failure' or log.status == 'failed' -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set type = log.obj_type if log.obj_type else 'Allgemein' -%}\r\n      {%- set msg = \"- [\" ~ type ~ \"] \" ~ log.message -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{\r\n  \"urls\": \"{%- if ns.has_failures -%}xmpps://netbox:{{ '' | xmpp_apprise_password }}@anoxinon.me/yosijo{%- endif -%}\",\r\n  \"title\": \"❌ NetBox Report: Fehlgeschlagene Checks in {{ data.script }}\",\r\n  \"body\": {% set body_text = \"Der Report \" ~ data.script ~ \" wurde von \" ~ username ~ \" ausgefuehrt.\\n\\nFolgende Checks sind fehlgeschlagen:\\n\" ~ ns.error_lines | join(\"\\n\") %}{{ body_text | json }}\r\n}"
}

Pre-Change Data

name: "XMPP YoSiJo - Reports"tags: []owner: 1secret: ""description: "xmpps://netbox@anoxinon.me/yosijo"http_method: "POST"payload_url: "https://apprise-api.stage.anoxinon.de/notify/"ca_file_path: nullbody_template: "{%- set ns = namespace(has_failures=false, error_lines=[]) -%}\r\n\r\n{# 1. Suche in NetBox v4 Report-Tests #}\r\n{%- if data.tests -%}\r\n  {%- for test_name, test_results in data.tests.items() -%}\r\n    {%- if test_results.failure -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set msg = \"- [\" ~ test_name ~ \"] \" ~ test_results.failure -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 2. Fallback fuer klassische Script-Logs #}\r\n{%- if data.result and data.result.log -%}\r\n  {%- for log in data.result.log -%}\r\n    {%- if log.status == 'failure' or log.status == 'failed' -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set type = log.obj_type if log.obj_type else 'Allgemein' -%}\r\n      {%- set msg = \"- [\" ~ type ~ \"] \" ~ log.message -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 3. Nur JSON ausgeben, wenn wirklich Fehler existieren #}\r\n{%- if ns.has_failures -%}\r\n{\r\n  \"urls\": \"xmpps://netbox:{{ '' | xmpp_apprise_password }}@anoxinon.me/yosijo\",\r\n  \"title\": \"❌ NetBox Report: Fehlgeschlagene Checks in {{ data.script }}\",\r\n  \"body\": {{ (\"Der Report \" ~ data.script ~ \" wurde von \" ~ username ~ \" ausgefuehrt.\\n\\nFolgende Checks sind fehlgeschlagen:\\n\" ~ ns.error_lines | join(\"\\n\")) | toJson }}\r\n}\r\n{%- else -%}\r\n{# Absichtlich komplett leerer Block, NetBox bricht den HTTP-Call ab, wenn kein JSON-Anfang '{' existiert #}\r\n{%- endif -%}"custom_fields: {}ssl_verification: truehttp_content_type: "application/json"additional_headers: ""

Post-Change Data

name: "XMPP YoSiJo - Reports"tags: []owner: 1secret: ""description: "xmpps://netbox@anoxinon.me/yosijo"http_method: "POST"payload_url: "https://apprise-api.stage.anoxinon.de/notify/"ca_file_path: nullbody_template: "{%- set ns = namespace(has_failures=false, error_lines=[]) -%}\r\n\r\n{# 1. Suche in NetBox v4 Report-Tests #}\r\n{%- if data.tests -%}\r\n  {%- for test_name, test_results in data.tests.items() -%}\r\n    {%- if test_results.failure -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set msg = \"- [\" ~ test_name ~ \"] \" ~ test_results.failure -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{# 2. Fallback fuer klassische Script-Logs #}\r\n{%- if data.result and data.result.log -%}\r\n  {%- for log in data.result.log -%}\r\n    {%- if log.status == 'failure' or log.status == 'failed' -%}\r\n      {%- set ns.has_failures = true -%}\r\n      {%- set type = log.obj_type if log.obj_type else 'Allgemein' -%}\r\n      {%- set msg = \"- [\" ~ type ~ \"] \" ~ log.message -%}\r\n      {%- set ns.error_lines = ns.error_lines + [msg] -%}\r\n    {%- endif -%}\r\n  {%- endfor -%}\r\n{%- endif -%}\r\n\r\n{\r\n  \"urls\": \"{%- if ns.has_failures -%}xmpps://netbox:{{ '' | xmpp_apprise_password }}@anoxinon.me/yosijo{%- endif -%}\",\r\n  \"title\": \"❌ NetBox Report: Fehlgeschlagene Checks in {{ data.script }}\",\r\n  \"body\": {% set body_text = \"Der Report \" ~ data.script ~ \" wurde von \" ~ username ~ \" ausgefuehrt.\\n\\nFolgende Checks sind fehlgeschlagen:\\n\" ~ ns.error_lines | join(\"\\n\") %}{{ body_text | json }}\r\n}"custom_fields: {}ssl_verification: truehttp_content_type: "application/json"additional_headers: ""
Documents
None

Related Changes

None