{
  "name": "Deploy docker Grafana, API backend for WHMCS/WISECP",
  "nodes": [
    {
      "id": "7cb4bdd3-4844-43ce-852f-3e225f2b2a7e",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -2060,
        -320
      ]
    },
    {
      "id": "e161eeef-2b77-4f58-a6d4-a12852888f26",
      "name": "Parametrs",
      "type": "n8n-nodes-base.set",
      "position": [
        -2280,
        -320
      ]
    },
    {
      "id": "5034b78c-7bec-48d5-8937-ae2a00cbe16a",
      "name": "API",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2600,
        -320
      ]
    },
    {
      "id": "8edfce4e-ab6a-4f79-a119-e5986ff51809",
      "name": "422-Invalid server domain",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2100,
        0
      ]
    },
    {
      "id": "b7a6dd13-f04d-4e64-a0d3-b61e0b362d8c",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        -240
      ]
    },
    {
      "id": "1b5709b7-0741-4ea2-97f8-688e383979ef",
      "name": "SSH",
      "type": "n8n-nodes-base.ssh",
      "position": [
        500,
        -240
      ]
    },
    {
      "id": "d51074fe-b478-4cfa-8dc7-43bc0eb94d26",
      "name": "Container Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1640,
        -120
      ]
    },
    {
      "id": "27e71291-23d8-4a3c-995e-05d4c7db9be1",
      "name": "Service Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        -880,
        -1080
      ]
    },
    {
      "id": "eb582191-9900-4766-b97a-0023211367ee",
      "name": "API answer",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        820,
        0
      ]
    },
    {
      "id": "5bf76884-8f0c-4f88-8533-3deb5d50877c",
      "name": "Inspect",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        -580
      ]
    },
    {
      "id": "b3e10c3d-5867-44cb-b273-ef1f8880f583",
      "name": "Stat",
      "type": "n8n-nodes-base.set",
      "position": [
        -980,
        -480
      ]
    },
    {
      "id": "623a1a9e-b2e4-4901-a856-4b6f833df460",
      "name": "Start",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        -140
      ]
    },
    {
      "id": "dc449d5f-3b80-40b7-b176-b08e935f659d",
      "name": "Stop",
      "type": "n8n-nodes-base.set",
      "position": [
        -1020,
        -40
      ]
    },
    {
      "id": "4a0b8b38-8dd6-4c02-927f-f7ec329f2125",
      "name": "Test Connection1",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -1320
      ]
    },
    {
      "id": "8dc51c60-be9d-42f2-8d39-ec18fc844cc1",
      "name": "Deploy",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -1120
      ]
    },
    {
      "id": "1a250f88-e55f-4cdb-9943-dd977f2de607",
      "name": "Suspend",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -960
      ]
    },
    {
      "id": "42313677-2ae3-43b6-a697-914eb5be01de",
      "name": "Terminated",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -620
      ]
    },
    {
      "id": "8334adb4-055c-499d-92aa-f83161fde017",
      "name": "Unsuspend",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -800
      ]
    },
    {
      "id": "3a9eea10-1d6d-4f7d-87a1-d104bb4b473b",
      "name": "Mount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        80
      ]
    },
    {
      "id": "53f81903-2a13-42dd-b7e6-e7788834c3e2",
      "name": "Unmount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        -1020,
        180
      ]
    },
    {
      "id": "775b2380-c2fb-411f-83ee-8f0f02ecbbb8",
      "name": "Log",
      "type": "n8n-nodes-base.set",
      "position": [
        -840,
        -380
      ]
    },
    {
      "id": "6b059a16-3455-4623-82f9-d01d18ae2d1a",
      "name": "ChangePackage",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        -460
      ]
    },
    {
      "id": "70a1c9f6-4044-446b-9402-7b4f946d7583",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2640,
        -1280
      ],
      "parameters": {
        "width": 639,
        "height": 909,
        "content": "## 👋 Welcome to PUQ Docker Grafana deploy!\n## Template for Grafana: API Backend for WHMCS/WISECP by PUQcloud\n\nv.1\n\nThis is an n8n template that creates an API backend for the WHMCS/WISECP module devel"
      }
    },
    {
      "id": "5e62ca53-14f2-43ca-ac32-78aeeb0ae482",
      "name": "Deploy-docker-compose",
      "type": "n8n-nodes-base.set",
      "position": [
        -1220,
        -1180
      ]
    },
    {
      "id": "c47f2008-6895-4b5a-b179-696754c928db",
      "name": "Version",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        780
      ]
    },
    {
      "id": "3bd23d91-10c3-4a0b-88f9-04ed0dd91af2",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1760,
        -1020
      ]
    },
    {
      "id": "0f16c9fc-9aa1-4575-9bf0-3f71115cc013",
      "name": "nginx",
      "type": "n8n-nodes-base.set",
      "position": [
        -1500,
        -1180
      ]
    },
    {
      "id": "e6c9f8da-7fb6-49fb-b760-cd19b01ff5c2",
      "name": "Container Stat",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1620,
        -480
      ]
    },
    {
      "id": "e03017d8-553e-4dbd-9477-692b85ffa721",
      "name": "GET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        280
      ]
    },
    {
      "id": "eed0f76e-4643-48a4-820c-0f44eab33e0f",
      "name": "SET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        -1060,
        440
      ]
    },
    {
      "id": "880185e2-39f1-48a2-adee-2a0a409239a7",
      "name": "GET NET",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        560
      ]
    },
    {
      "id": "06a25f19-dcdc-4132-a489-683ebb386f45",
      "name": "Change Password",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        980
      ]
    },
    {
      "id": "5fbab8d0-97a9-4652-b9e8-a824db99fe83",
      "name": "Grafana",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1600,
        780
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Container Stat",
            "type": "main",
            "index": 0
          },
          {
            "node": "Container Actions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Grafana",
            "type": "main",
            "index": 0
          },
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "422-Invalid server domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API": {
      "main": [
        [
          {
            "node": "Parametrs",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "nginx",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Service Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SSH": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stat": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stop": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "API answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "nginx": {
      "main": [
        [
          {
            "node": "Deploy-docker-compose",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deploy": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET ACL": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET NET": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grafana": {
      "main": [
        [
          {
            "node": "Version",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Change Password",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inspect": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET ACL": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Suspend": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Version": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parametrs": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unsuspend": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mount Disk": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Terminated": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unmount Disk": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ChangePackage": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Stat": {
      "main": [
        [
          {
            "node": "Inspect",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stat",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change Password": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Service Actions": {
      "main": [
        [
          {
            "node": "Test Connection1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deploy",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Suspend",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Unsuspend",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Terminated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ChangePackage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Connection1": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Actions": {
      "main": [
        [
          {
            "node": "Start",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mount Disk",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Unmount Disk",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "GET ACL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SET ACL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "GET NET",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deploy-docker-compose": {
      "main": [
        [
          {
            "node": "Service Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}