1 line
8.0 KiB
JSON
1 line
8.0 KiB
JSON
|
|
{"name": "Garvis Webhook - Bot Actions", "nodes": [{"parameters": {"httpMethod": "POST", "path": "garvis", "responseMode": "responseNode", "options": {}}, "id": "b2c3d4e5-2222-4000-8000-000000000001", "name": "Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [0, 300], "webhookId": "garvis-webhook"}, {"parameters": {"conditions": {"options": {"caseSensitive": true, "leftValue": "", "typeValidation": "strict"}, "conditions": [{"id": "auth1", "leftValue": "={{ $json.headers['x-garvis-secret'] }}", "rightValue": "={{ $env.GARVIS_WEBHOOK_SECRET }}", "operator": {"type": "string", "operation": "equals"}}], "combinator": "and"}}, "id": "b2c3d4e5-2222-4000-8000-000000000002", "name": "IF Auth Valid?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [220, 300]}, {"parameters": {"respondWith": "json", "responseBody": "={\"error\": \"Unauthorized\", \"message\": \"Invalid or missing x-garvis-secret header\"}", "options": {"responseCode": 401}}, "id": "b2c3d4e5-2222-4000-8000-000000000003", "name": "Respond 401", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [440, 480]}, {"parameters": {"rules": {"rules": [{"value": "run_pipeline", "output": 0}, {"value": "check_nas", "output": 1}, {"value": "check_services", "output": 2}, {"value": "send_message", "output": 3}, {"value": "get_status", "output": 4}]}, "value": "={{ $json.body.action }}"}, "id": "b2c3d4e5-2222-4000-8000-000000000004", "name": "Switch Action", "type": "n8n-nodes-base.switch", "typeVersion": 3, "position": [440, 200]}, {"parameters": {"method": "POST", "url": "http://192.168.2.113:5678/api/v1/workflows/{{ $env.CONTENT_PIPELINE_ID }}/activate", "sendHeaders": true, "headerParameters": {"parameters": [{"name": "X-N8N-API-KEY", "value": "={{ $env.N8N_API_KEY }}"}]}}, "id": "b2c3d4e5-2222-4000-8000-000000000005", "name": "Trigger Content Pipeline", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [700, 0]}, {"parameters": {"method": "POST", "url": "http://192.168.2.210:5000/webapi/entry.cgi", "sendBody": true, "bodyParameters": {"parameters": [{"name": "api", "value": "SYNO.FileStation.List"}, {"name": "version", "value": "2"}, {"name": "method", "value": "list"}, {"name": "folder_path", "value": "={{ $json.body.path || '/BlendedFamilyKitchen/DropZone' }}"}]}}, "id": "b2c3d4e5-2222-4000-8000-000000000006", "name": "Check NAS Files", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [700, 140]}, {"parameters": {"command": "=echo '{\"proxmox\": \"checking...\", \"loki\": \"checking...\", \"nas\": \"checking...\"}' && curl -s -o /dev/null -w '%{http_code}' http://192.168.2.100:8006 && curl -s -o /dev/null -w '%{http_code}' http://192.168.2.114:3100/ready && curl -s -o /dev/null -w '%{http_code}' http://192.168.2.210:5000"}, "id": "b2c3d4e5-2222-4000-8000-000000000007", "name": "Check Services Health", "type": "n8n-nodes-base.executeCommand", "typeVersion": 1, "position": [700, 280]}, {"parameters": {"method": "POST", "url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/sendMessage", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n \"chat_id\": \"{{ $json.body.chat_id || $env.JORDAN_CHAT_ID }}\",\n \"text\": \"{{ $json.body.message }}\",\n \"parse_mode\": \"HTML\"\n}"}, "id": "b2c3d4e5-2222-4000-8000-000000000008", "name": "Send Telegram Message", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [700, 420]}, {"parameters": {"mode": "manual", "duplicateItem": false, "assignments": {"assignments": [{"id": "st1", "name": "status", "value": "operational", "type": "string"}, {"id": "st2", "name": "workflows_active", "value": "={{ $env.ACTIVE_WORKFLOW_COUNT || '0' }}", "type": "string"}, {"id": "st3", "name": "uptime", "value": "={{ $now.toISO() }}", "type": "string"}, {"id": "st4", "name": "version", "value": "1.0.0", "type": "string"}]}}, "id": "b2c3d4e5-2222-4000-8000-000000000009", "name": "Get System Status", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [700, 560]}, {"parameters": {"respondWith": "json", "res
|