{
  "name": "Deploy Docker n8n, API backend for WHMCS/WISECP",
  "nodes": [
    {
      "id": "fc30f537-51d2-45df-b1c4-5d4cd9d80a0e",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -2060,
        -320
      ]
    },
    {
      "id": "6152fc38-2e50-4db5-b6f6-6e7d2492bbb1",
      "name": "Parametrs",
      "type": "n8n-nodes-base.set",
      "position": [
        -2280,
        -320
      ]
    },
    {
      "id": "cf1b3eea-0439-418b-8c68-f7e45ddfbc7e",
      "name": "API",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2600,
        -320
      ]
    },
    {
      "id": "516ac020-add2-4b08-ae91-bfb95dec2f88",
      "name": "422-Invalid server domain",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2100,
        0
      ]
    },
    {
      "id": "4e50cf8e-cfa7-4249-a847-9f8ff27664e4",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        100,
        100
      ]
    },
    {
      "id": "c7575c21-00dc-4238-95aa-3e20ff5d21a3",
      "name": "SSH",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -180,
        100
      ]
    },
    {
      "id": "2e017042-f991-45c7-afc4-ffdfcded4003",
      "name": "Container Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1680,
        580
      ]
    },
    {
      "id": "2fdb7b98-d6f8-44b4-917b-1ed2bb0e65f8",
      "name": "Service Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1240,
        -1140
      ]
    },
    {
      "id": "ac5541f1-94e4-4c7e-a3a5-58b56b9e1ea8",
      "name": "Container Stats",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1680,
        -340
      ]
    },
    {
      "id": "33dab9ef-121f-4b8a-af2b-7e1151ebd95f",
      "name": "API answer",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        400,
        100
      ]
    },
    {
      "id": "3b8ae835-901c-44b5-9635-7c1d92509704",
      "name": "Inspect",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        -540
      ]
    },
    {
      "id": "8193cb7c-50eb-49d3-a4d3-1c0b7686a1b1",
      "name": "Stat",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        -340
      ]
    },
    {
      "id": "1888734f-11a9-47a1-8353-c6b2862ff437",
      "name": "Start",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        240
      ]
    },
    {
      "id": "e9886d6a-c537-4a1e-b2d4-1c4bfaf379e3",
      "name": "Stop",
      "type": "n8n-nodes-base.set",
      "position": [
        -1080,
        340
      ]
    },
    {
      "id": "07ff56b6-6b49-4215-9801-2c13124e0023",
      "name": "Test Connection1",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -1140
      ]
    },
    {
      "id": "e8ad165b-fb70-41fe-938d-5f600c57d1d0",
      "name": "Deploy",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -980
      ]
    },
    {
      "id": "a6346a99-545f-4873-ac41-8c25941f34e9",
      "name": "Suspend",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -820
      ]
    },
    {
      "id": "61cba08a-a873-4a1c-98a4-75a3986d8e63",
      "name": "Terminated",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -480
      ]
    },
    {
      "id": "a66a034f-970a-4cee-b324-f1b423625bd7",
      "name": "Unsuspend",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -660
      ]
    },
    {
      "id": "f05ac0c4-61b6-4546-9a39-1ef03e360c14",
      "name": "Mount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        460
      ]
    },
    {
      "id": "803652a7-b75c-4e58-a935-7899ef98815b",
      "name": "Unmount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        -1080,
        560
      ]
    },
    {
      "id": "72f8b5bd-0826-4c21-b201-8714969bb6a4",
      "name": "Log",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        -160
      ]
    },
    {
      "id": "c170dd11-18bf-41c9-a07c-2f0c9d0fdb01",
      "name": "ChangePackage",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        -300
      ]
    },
    {
      "id": "da927c27-bc27-4f1f-bd06-90cb273a423d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2640,
        -1260
      ],
      "parameters": {
        "width": 639,
        "height": 909,
        "content": "## 👋 Welcome to PUQ Docker n8n deploy!\n## Template for n8n: 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 developed by "
      }
    },
    {
      "id": "7d1edb5c-9836-4dad-9116-bd14a5e7ab2c",
      "name": "n8n",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1680,
        1380
      ]
    },
    {
      "id": "dcc07564-d2e1-46a5-a1ad-662aff29c681",
      "name": "Version",
      "type": "n8n-nodes-base.set",
      "position": [
        -1180,
        1360
      ]
    },
    {
      "id": "bb6f2cc2-861a-4c6f-9206-b3077fb98d06",
      "name": "Users",
      "type": "n8n-nodes-base.set",
      "position": [
        -1060,
        1460
      ]
    },
    {
      "id": "e9a08c32-28e6-461f-a620-869dcc5cb1e5",
      "name": "Change Password",
      "type": "n8n-nodes-base.set",
      "position": [
        -1160,
        1560
      ]
    },
    {
      "id": "60fafb1e-0f67-4759-8625-b08409c5b462",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1940,
        -1100
      ]
    },
    {
      "id": "913d96ae-bd47-4db2-b83b-68c49b51b33a",
      "name": "nginx",
      "type": "n8n-nodes-base.set",
      "position": [
        -1740,
        -1240
      ]
    },
    {
      "id": "5172c533-170f-4f08-95af-de090347c832",
      "name": "Deploy-docker-compose",
      "type": "n8n-nodes-base.set",
      "position": [
        -1500,
        -1240
      ]
    },
    {
      "id": "a9a52bcd-b9b8-436e-a2cc-1f11747626aa",
      "name": "GET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        680
      ]
    },
    {
      "id": "b6535cd0-2264-4ede-9da6-03c128d54682",
      "name": "SET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        -1100,
        800
      ]
    },
    {
      "id": "5b2452e4-3c2a-42e3-8855-dedd6c8f8ec9",
      "name": "GET NET",
      "type": "n8n-nodes-base.set",
      "position": [
        -1220,
        900
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Container Stats",
            "type": "main",
            "index": 0
          },
          {
            "node": "Container Actions",
            "type": "main",
            "index": 0
          },
          {
            "node": "n8n",
            "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
          }
        ]
      ]
    },
    "n8n": {
      "main": [
        [
          {
            "node": "Version",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Users",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Change Password",
            "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
          }
        ]
      ]
    },
    "Users": {
      "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
          }
        ]
      ]
    },
    "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
          }
        ]
      ]
    },
    "Change Password": {
      "main": [
        [
          {
            "node": "SSH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Stats": {
      "main": [
        [
          {
            "node": "Inspect",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stat",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log",
            "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
          }
        ]
      ]
    }
  }
}