{"id": "bpq5aoogWibWq94t", "name": "puq-docker-influxdb-deploy", "nodes": [{"id": "b1c793ae-265c-420b-8cd1-8ecc180bfb52", "name": "If", "type": "n8n-nodes-base.if", "position": [-2060, -320], "parameters": {"options": {}, "conditions": {"options": {"version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict"}, "combinator": "or", "conditions": [{"id": "b702e607-888a-42c9-b9a7-f9d2a64dfccd", "operator": {"type": "string", "operation": "equals"}, "leftValue": "={{ $json.server_domain }}", "rightValue": "={{ $('API').item.json.body.server_domain }}"}]}}, "typeVersion": 2.2}, {"id": "d93df9de-1c37-46ee-8bbf-77297a1b63d5", "name": "Parametrs", "type": "n8n-nodes-base.set", "position": [-2280, -320], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "a6328600-7ee0-4031-9bdb-fcee99b79658", "name": "server_domain", "type": "string", "value": "d01-test.uuq.pl"}, {"id": "370ddc4e-0fc0-48f6-9b30-ebdfba72c62f", "name": "clients_dir", "type": "string", "value": "/opt/docker/clients"}, {"id": "92202bb8-6113-4bc5-9a29-79d238456df2", "name": "mount_dir", "type": "string", "value": "/mnt"}, {"id": "baa52df2-9c10-42b2-939f-f05ea85ea2be", "name": "screen_left", "type": "string", "value": "{{"}, {"id": "2b19ed99-2630-412a-98b6-4be44d35d2e7", "name": "screen_right", "type": "string", "value": "}}"}]}}, "typeVersion": 3.4}, {"id": "35e09115-77bc-48e4-b534-d6015162521f", "name": "API", "type": "n8n-nodes-base.webhook", "position": [-2600, -320], "webhookId": "6760feea-1d9b-466c-82a9-3891a300b0fd", "parameters": {"path": "docker-influxdb", "options": {}, "httpMethod": ["POST"], "responseMode": "responseNode", "authentication": "basicAuth", "multipleMethods": true}, "credentials": {"httpBasicAuth": {"id": "ljwsCBagSzOWlGsf", "name": "InfluxDB"}}, "typeVersion": 2}, {"id": "bddedef2-c43f-4e7b-b599-13fb7d47d504", "name": "422-Invalid server domain", "type": "n8n-nodes-base.respondToWebhook", "position": [-2100, 0], "parameters": {"options": {"responseCode": 422}, "respondWith": "json", "responseBody": "[{\n \"status\": \"error\",\n \"error\": \"Invalid server domain\"\n}]"}, "typeVersion": 1.1, "alwaysOutputData": false}, {"id": "eedc340a-f599-4e65-91cc-299a9cc075e6", "name": "Code1", "type": "n8n-nodes-base.code", "position": [800, -240], "parameters": {"mode": "runOnceForEachItem", "jsCode": "try {\n if ($json.stdout === 'success') {\n return {\n json: {\n status: 'success',\n message: '',\n data: '',\n }\n };\n }\n\n const parsedData = JSON.parse($json.stdout);\n\n return {\n json: {\n status: parsedData.status === 'error' ? 'error' : 'success',\n message: parsedData.message