{
  "name": "InsertDB",
  "nodes": [
    {
      "parameters": {
        "jsCode": "// L\u1ea5y chu\u1ed7i \u0111\u1ea7u v\u00e0o\nconst input = $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"VatPham\"];\n\n// T\u00e1ch chu\u1ed7i theo d\u1ea5u ph\u1ea9y\nconst items = input.split(',').map(item => item.trim());\n\n// Bi\u1ebfn \u0111\u1ec3 ch\u1ee9a k\u1ebft qu\u1ea3\nconst result = [];\n\n// Duy\u1ec7t qua t\u1eebng m\u1ee5c v\u00e0 ph\u00e2n t\u00edch\nitems.forEach(item => {\n  const parts = item.split(' ');  // T\u00e1ch theo kho\u1ea3ng tr\u1eafng\n  const name = parts.slice(0, -2).join(' ');  // T\u00ean m\u1eb7t h\u00e0ng (b\u1ecf 2 ph\u1ea7n t\u1eed cu\u1ed1i)\n  const quantity = parts[parts.length - 2];  // S\u1ed1 l\u01b0\u1ee3ng\n  const unit = parts[parts.length - 1];  // \u0110\u01a1n v\u1ecb\n\n  // Th\u00eam th\u00f4ng tin v\u00e0o k\u1ebft qu\u1ea3\n  result.push({ name, quantity, unit });\n});\n\n// Tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 v\u1edbi m\u1ed7i ph\u1ea7n t\u1eed l\u00e0 m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng JSON ri\u00eang bi\u1ec7t\nreturn result.map(i => ({ json: i }));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        -280
      ],
      "id": "eb0e8201-f226-4930-a3c0-65b63c950610",
      "name": "Code"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"result\": \"Qu\u00e1 tr\u00ecnh \u0111\u0103ng k\u00fd th\u00e0nh c\u00f4ng\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1240,
        -300
      ],
      "id": "20d95a58-8ed2-4136-82b5-9637af81ae1c",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO THONGTINNGUOIQUYENGOP (CCCD, HoTen, SoDienThoai, DiaChi, Email)\nVALUES ('{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"Cccd\"] }}', '{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"HoTen\"] }}', '{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"SoDienThoai\"] }}', '{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"DiaChi\"] }}', '{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"Email\"] }}');\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        480,
        220
      ],
      "id": "7eb38f10-1545-4ea1-8443-ce3a477df2e3",
      "name": "InsertThongTinNguoiQuyenGop",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "Select count(*) from THONGTINNGUOIQUYENGOP WHERE CCCD = '{{ $json.body.Cccd }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -340,
        -140
      ],
      "id": "87477b1d-da7c-4f34-be58-212cd7c00073",
      "name": "SearchCCCD",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "51a46c03-3698-48e1-82be-46a601866482",
              "leftValue": "={{ $item(\"0\").$node[\"SearchCCCD\"].json[\"count(*)\"] }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -40,
        -140
      ],
      "id": "ffa2f923-2585-4d2a-9832-cc78db117d78",
      "name": "If"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO CHITIETQUYENGOP (CCCD,MaNhuYeuPham,SLuongQuyenGop)\nVALUES ('{{ $item(\"0\").$node[\"DangKyQuyenGop\"].json[\"body\"][\"Cccd\"] }}','{{ $json.MaNhuYeuPham }}',{{ $item(\"0\").$node[\"Code1\"].json[\"quantity\"] }});\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        1640,
        440
      ],
      "id": "c8a4ec4d-77b7-464b-a40e-e696b026687e",
      "name": "InsertNhuYeuPhamQuyenGop",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1000,
        -280
      ],
      "id": "7fe0ec7d-ef87-4e3e-af0d-e04a132002aa",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1160,
        -40
      ],
      "id": "945f2b3a-37e7-445e-9e34-89a6117c6e7b",
      "name": "Code1"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "select MaNhuYeuPham from NHUYEUPHAM Where TenNhuYeuPham = '{{ $json.name }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        1400,
        120
      ],
      "id": "1bf0df23-3591-495e-8a79-23c08208ce18",
      "name": "GetMaNhuYeuPham",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// L\u1ea5y chu\u1ed7i \u0111\u1ea7u v\u00e0o\nconst input = $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"NhuYeuPham\"];\n\n// T\u00e1ch chu\u1ed7i theo d\u1ea5u ph\u1ea9y\nconst items = input.split(',').map(item => item.trim());\n\n// Bi\u1ebfn \u0111\u1ec3 ch\u1ee9a k\u1ebft qu\u1ea3\nconst result = [];\n\n// Duy\u1ec7t qua t\u1eebng m\u1ee5c v\u00e0 ph\u00e2n t\u00edch\nitems.forEach(item => {\n  const parts = item.split(' ');  // T\u00e1ch theo kho\u1ea3ng tr\u1eafng\n  const name = parts.slice(0, -2).join(' ');  // T\u00ean m\u1eb7t h\u00e0ng (b\u1ecf 2 ph\u1ea7n t\u1eed cu\u1ed1i)\n  const quantity = parts[parts.length - 2];  // S\u1ed1 l\u01b0\u1ee3ng\n  const unit = parts[parts.length - 1];  // \u0110\u01a1n v\u1ecb\n\n  // Th\u00eam th\u00f4ng tin v\u00e0o k\u1ebft qu\u1ea3\n  result.push({ name, quantity, unit });\n});\n\n// Tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 v\u1edbi m\u1ed7i ph\u1ea7n t\u1eed l\u00e0 m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng JSON ri\u00eang bi\u1ec7t\nreturn result.map(i => ({ json: i }));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        700
      ],
      "id": "4f9876e9-dd90-4899-83b2-afbab2df32f1",
      "name": "Code2",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"result\": \"Qu\u00e1 tr\u00ecnh \u0111\u0103ng k\u00fd th\u00e0nh c\u00f4ng\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1900,
        680
      ],
      "id": "27bdf5e7-7d25-4d9e-9aca-e74f9e907ab0",
      "name": "Respond to Webhook1"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO THONGTINNGUOINHAN (CCCD, HoTen, SoDienThoai, DiaChi, Email)\nVALUES ('{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"Cccd\"] }}', '{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"HoTen\"] }}', '{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"SoDienThoai\"] }}', '{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"DiaChi\"] }}', '{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"Email\"] }}');\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -460,
        1200
      ],
      "id": "afe2cf62-7001-4b35-9a51-8d9c14b44718",
      "name": "InsertThongTinNguoiQuyenGop1",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "Select count(*) from THONGTINNGUOINHAN WHERE CCCD = '{{ $json.body.Cccd }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -880,
        820
      ],
      "id": "1123521c-f778-4536-9e76-0d4964b105b1",
      "name": "SearchCCCD1",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "51a46c03-3698-48e1-82be-46a601866482",
              "leftValue": "={{ $item(\"0\").$node[\"SearchCCCD1\"].json[\"count(*)\"] }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -660,
        840
      ],
      "id": "0fed8651-979b-4ad5-8b45-1ef1166ef299",
      "name": "If1"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        560,
        680
      ],
      "id": "fa8f02f1-d994-49c3-be3b-19f8ce3256d2",
      "name": "Loop Over Items1"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        920
      ],
      "id": "84b4b4e9-f5ef-46b5-baad-93f6731242bb",
      "name": "Code3"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT COALESCE(MaNhuYeuPham, -1) as item\nFROM NHUYEUPHAM \nWHERE TenNhuYeuPham = '{{ $json[\"name\"] }}'\nLIMIT 1;\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        940,
        1060
      ],
      "id": "5c89e2ce-d158-4215-ac4e-3ac366ce0bf4",
      "name": "GetMaNhuYeuPham1",
      "alwaysOutputData": true,
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "register-provider-v-relief-2024",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -660,
        -140
      ],
      "id": "fe7fcb35-e381-4d42-9955-77294fdd33a3",
      "name": "DangKyQuyenGop"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "register-receiver-v-relief-2024",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -1260,
        820
      ],
      "id": "8428f0b7-ba6d-49f2-b553-861de4c05f83",
      "name": "DangKyCuuTro"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO PHIEUYEUCAU (CCCD,TrangThai)\nVALUES\n('{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"Cccd\"] }}','Pending')",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -280,
        760
      ],
      "id": "533330dc-fd0a-47ce-86f6-0891b422344a",
      "name": "InsertPhieuYeuCau",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "register-volunteer-v-relief-2024",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -1280,
        1500
      ],
      "id": "529bd45f-491b-4add-a00d-b73d95f4355b",
      "name": "DangKyTinhNguyenVien"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "Select count(*) from TINHNGUYENVIEN WHERE CCCD = '{{ $json.body.Cccd }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -940,
        1500
      ],
      "id": "a842069e-9e8d-4290-beaf-25e51b075e36",
      "name": "SearchCCCD2",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "51a46c03-3698-48e1-82be-46a601866482",
              "leftValue": "={{ $item(\"0\").$node[\"SearchCCCD2\"].json[\"count(*)\"] }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -700,
        1500
      ],
      "id": "7499398a-9039-4740-adcf-516d2e8f4080",
      "name": "If2"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO TINHNGUYENVIEN (CCCD, HoTen, SoDienThoai, DiaChi, Email)\nVALUES ('{{ $item(\"0\").$node[\"DangKyTinhNguyenVien\"].json[\"body\"][\"Cccd\"] }}', '{{ $item(\"0\").$node[\"DangKyTinhNguyenVien\"].json[\"body\"][\"HoTen\"] }}', '{{ $item(\"0\").$node[\"DangKyTinhNguyenVien\"].json[\"body\"][\"SoDienThoai\"] }}', '{{ $item(\"0\").$node[\"DangKyTinhNguyenVien\"].json[\"body\"][\"DiaChi\"] }}', '{{ $item(\"0\").$node[\"DangKyTinhNguyenVien\"].json[\"body\"][\"Email\"] }}');\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -340,
        1720
      ],
      "id": "5cee45f3-a793-43df-9cfd-4bb4a26ddc23",
      "name": "InsertThongTinNguoiQuyenGop2",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"result\": \"B\u1ea1n \u0111\u00e3 c\u00f3 \u0111\u0103ng k\u00fd tr\u01b0\u1edbc \u0111\u00f3 r\u1ed3i\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        -220,
        1420
      ],
      "id": "58add01b-7d9d-4705-b332-76bed8395fe8",
      "name": "Respond to Webhook2"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"result\": \"Qu\u00e1 tr\u00ecnh \u0111\u0103ng k\u00fd th\u00e0nh c\u00f4ng\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        80,
        1720
      ],
      "id": "8599fbb4-4fb0-46bb-ae45-ee6a7ca741ea",
      "name": "Respond to Webhook3"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO CHITIETYEUCAU (MaNhuYeuPham,IDPhieu,SLYeuCau,SLConLai)\nVALUES ('{{ $item(\"0\").$node[\"DangKyCuuTro\"].json[\"body\"][\"Cccd\"] }}','{{ $item(\"0\").$node[\"selectCurrentIDPhieu\"].json[\"MAX(IDPhieu)\"] }}','{{ $item(\"0\").$node[\"Code2\"].json[\"quantity\"] }}','{{ $item(\"0\").$node[\"Code2\"].json[\"quantity\"] }}');\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        1440,
        1420
      ],
      "id": "c1b193aa-1f4b-45e0-8bff-400880004914",
      "name": "InsertChiTietPhieuYeuCau",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "select MAX(IDPhieu) from PHIEUYEUCAU",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        -20,
        780
      ],
      "id": "f478270c-9ff2-4af4-8edf-ee4689fb11da",
      "name": "selectCurrentIDPhieu",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://160.30.112.34/process",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n    \"user_input\": \"T\u00f4i t\u00ean l\u00e0 Nguy\u1ec5n V\u0103n A, \u1edf khu v\u1ef1c mi\u1ec1n Trung. T\u00f4i c\u1ea7n h\u1ed7 tr\u1ee3 10 t\u1ea5n g\u1ea1o, 500 th\u00f9ng m\u00ec t\u00f4m v\u00e0 200 b\u1ed9 qu\u1ea7n \u00e1o \u0111\u1ec3 gi\u00fap \u0111\u1ee1 ng\u01b0\u1eddi d\u00e2n b\u1ecb \u1ea3nh h\u01b0\u1edfng b\u1edfi l\u0169 l\u1ee5t.\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2680,
        860
      ],
      "id": "9603db82-848e-4955-8e35-c41dbf840573",
      "name": "HTTP Request"
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertThongTinNguoiQuyenGop": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchCCCD": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "InsertThongTinNguoiQuyenGop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertNhuYeuPhamQuyenGop": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "GetMaNhuYeuPham",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetMaNhuYeuPham": {
      "main": [
        [
          {
            "node": "InsertNhuYeuPhamQuyenGop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertThongTinNguoiQuyenGop1": {
      "main": [
        [
          {
            "node": "InsertPhieuYeuCau",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchCCCD1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "InsertPhieuYeuCau",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "InsertThongTinNguoiQuyenGop1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Respond to Webhook1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code3": {
      "main": [
        [
          {
            "node": "GetMaNhuYeuPham1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetMaNhuYeuPham1": {
      "main": [
        [
          {
            "node": "InsertChiTietPhieuYeuCau",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DangKyQuyenGop": {
      "main": [
        [
          {
            "node": "SearchCCCD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DangKyCuuTro": {
      "main": [
        [
          {
            "node": "SearchCCCD1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertPhieuYeuCau": {
      "main": [
        [
          {
            "node": "selectCurrentIDPhieu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DangKyTinhNguyenVien": {
      "main": [
        [
          {
            "node": "SearchCCCD2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchCCCD2": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Respond to Webhook2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "InsertThongTinNguoiQuyenGop2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertThongTinNguoiQuyenGop2": {
      "main": [
        [
          {
            "node": "Respond to Webhook3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InsertChiTietPhieuYeuCau": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "selectCurrentIDPhieu": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook3": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3a7ad009-11f0-46e3-b922-5ead4ef2ad17",
  "id": "KU63MFd1mJQ2gdRr",
  "tags": []
}