{ "name": "knaster: Service-Routine (wöchentlich)", "nodes": [ { "parameters": { "rule": { "interval": [ { "field": "weeks", "weeksInterval": 1, "triggerAtDay": [ 1 ], "triggerAtHour": 8 } ] } }, "id": "c58239bb-f1c9-557c-952c-21645fcb8a57", "name": "Zeitplan", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ 0, 300 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "df17a04d-3369-5ef6-83b2-150c90db08fa", "name": "router_url", "value": "http://router:8080", "type": "string" }, { "id": "fb597b99-b6c3-5306-b5fa-68ffc02938d3", "name": "channel_url", "value": "https://example.invalid/kanal-webhook", "type": "string" } ] }, "options": {} }, "id": "dc94a1c9-74b6-5403-942a-59a84e634a59", "name": "Konfiguration", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 220, 300 ], "notes": "Nach dem Import anpassen. Credential 'knaster-router' = Header Auth: Authorization / Bearer " }, { "parameters": { "method": "POST", "url": "={{ $('Konfiguration').item.json.router_url }}/v1/maintenance/routine", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({}) }}", "options": { "timeout": 180000 } }, "id": "ba3983aa-c877-5686-8297-60b9be29bdb3", "name": "Routine starten", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 440, 300 ], "credentials": { "httpHeaderAuth": { "id": "", "name": "knaster-router" } } }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "loose" }, "conditions": [ { "id": "f74160f5-984f-5078-9fc3-5557cdc71e5f", "leftValue": "={{ $json.findings.length + $json.proposals.length + $json.auto_executed.length }}", "rightValue": 0, "operator": { "type": "number", "operation": "gt" } } ], "combinator": "and" }, "options": {} }, "id": "07062ef5-09ab-5043-83d6-7d4806fe945a", "name": "Etwas zu tun?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [ 660, 300 ] }, { "parameters": { "method": "POST", "url": "={{ $('Konfiguration').item.json.channel_url }}", "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({ text: $json.text }) }}", "options": {} }, "id": "f6ec4fd3-03a4-5226-beec-ac4f11c0fb30", "name": "An Kanal senden", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 880, 200 ], "notes": "Kanal (Telegram/Matrix/Mail) hier anbinden. Antworten laufen über den Pflege-Chat." } ], "connections": { "Zeitplan": { "main": [ [ { "node": "Konfiguration", "type": "main", "index": 0 } ] ] }, "Konfiguration": { "main": [ [ { "node": "Routine starten", "type": "main", "index": 0 } ] ] }, "Routine starten": { "main": [ [ { "node": "Etwas zu tun?", "type": "main", "index": 0 } ] ] }, "Etwas zu tun?": { "main": [ [ { "node": "An Kanal senden", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "tags": [ { "name": "knaster" }, { "name": "hitl" } ], "meta": { "description": "cluster-knaster – siehe docs/spec. Import inaktiv, Credentials setzen." } }