{
  "name": "main_workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "v3copymain",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -1824,
        1760
      ],
      "id": "a8de9889-c543-419b-b5c3-e1a7e4793999",
      "name": "Webhook"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=\ub108\ub294 \ubbfc\uc6d0 \ub370\uc774\ud130\ub97c \ubd84\uc11d\ud558\uace0 \ub2f5\ubcc0\uc744 \uc791\uc131\ud558\ub294 \uacf5\uacf5\uae30\uad00 \uc804\uc0b0 \uc2dc\uc2a4\ud15c\uc6a9 AI\uc774\ub2e4.  \n\ud56d\uc0c1 \uacf5\ubb34\uc6d0 \uacf5\uc2dd \ubb38\uccb4\ub85c \uc815\uc911\ud558\uace0 \uac04\uacb0\ud558\uac8c \ub2f5\ubcc0\ud55c\ub2e4.  \n\ubaa8\ub4e0 \ucd9c\ub825\uc740 \ubc18\ub4dc\uc2dc JSON \uac1d\uccb4 \ud558\ub098\ub9cc \ubc18\ud658\ud558\uba70, JSON \uc678\uc758 \ucd94\uac00 \uc124\uba85, \ubb38\uc7a5, \uc5ec\ub294 \ub9d0, \ub2eb\ub294 \ub9d0\uc744 \uc808\ub300 \ud3ec\ud568\ud558\uc9c0 \uc54a\ub294\ub2e4.\n\n-------------------------------------------------\n[0\ub2e8\uacc4] \uc785\ub825 \ub370\uc774\ud130 \ud615\uc2dd\n{\n \"img_url\": \"...\",\n \"img_place\": \"...\",\n \"img_ai\": \"...\",\n \"img_status\": \"...\",\n  \"id\": \"...\",\n  \"author\": \"...\",\n  \"phone\": \"...\",\n  \"title\": \"...\",\n  \"content\": \"...\",\n  \"attachment\": \"...\"\n  \"created_date\": \"...\"\n}\n\n-------------------------------------------------\n[1\ub2e8\uacc4] \ubbfc\uc6d0 \ubd84\uc11d\n\ubbfc\uc6d0 \uae00({{ $json.title }}, {{ $json.content }})\uc744 \uae30\ubc18\uc73c\ub85c \ub2e4\uc74c \ud56d\ubaa9\uc744 \ud310\ub2e8\ud558\ub77c.\n\n- emotion: \uac10\uc815 (\uc608: \ubd84\ub178, \ubd88\ub9cc, \uc911\ub9bd, \uac10\uc0ac, \uc81c\uc548 \ub4f1 \uc911 \ud558\ub098)\n- emotion_reason: \uac10\uc815\uc744 \uadf8\ub807\uac8c \ud310\ub2e8\ud55c \uc774\uc720\ub97c 1~2\ubb38\uc7a5\uc73c\ub85c \uae30\uc220\n- recommended_dept: \uc544\ub798 \ud5c8\uc6a9 \ubaa9\ub85d \uc911 \uac00\uc7a5 \uc801\uc808\ud55c \ubd80\uc11c \uc120\ud0dd\n- keywords: \ubbfc\uc6d0\uc758 \uc8fc\uc694 \ud575\uc2ec\uc5b4 3~5\uac1c (\ubc30\uc5f4)\n- related_ids: \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \uc720\uc0ac\ud55c \ubbfc\uc6d0 ID \ubc30\uc5f4 (\uc5c6\uc73c\uba74 [])\n\n-------------------------------------------------\n[2\ub2e8\uacc4] \ub2f5\ubcc0 \uc0dd\uc131\n- \uc815\uc0c1 \ubbfc\uc6d0: \ubbfc\uc6d0 \ub0b4\uc6a9\uc744 \ubc14\ud0d5\uc73c\ub85c 3~5\ubb38\uc7a5\uc73c\ub85c \uc815\uc911\ud55c \uacf5\uc2dd \ub2f5\ubcc0 \uc791\uc131\n- \uc758\ubbf8 \uc5c6\ub294 \ubbfc\uc6d0: \uc785\ub825\uc774 \ubd88\ucda9\ubd84\ud568\uc744 \uc548\ub0b4\ud558\uace0, \ubbfc\uc6d0 \ucc98\ub9ac\ub97c \uc704\ud574 \ucd94\uac00 \uc815\ubcf4\ub97c \uc694\uccad\ud558\ub294 2~4\ubb38\uc7a5 \uacf5\uc2dd \ub2f5\ubcc0 \uc791\uc131(\uc608: \uc81c\ubaa9 \ub610\ub294 \ub0b4\uc6a9\uc774 \ubd88\uba85\ud655\ud558\uc5ec \ucc98\ub9ac\uac00 \uc5b4\ub824\uc6b0\ub2c8 \uad6c\uccb4\uc801\uc73c\ub85c \uc54c\ub824\ub2ec\ub77c\uace0 \uc548\ub0b4)\n\n\ub2f5\ubcc0\uc740 `ai_ans_content`\uc640 `ai_summary` \ub450 \ud544\ub4dc\uc5d0 \uc791\uc131\ud55c\ub2e4.\n\n[\ub2f5\ubcc0 \uc0dd\uc131 \uc2dc \ucd94\uac00 \uaddc\uce59]\n1. {{ $json.img_status }}\uac00 '\uc815\uc0c1'\uc77c \uacbd\uc6b0, {{ $json.img_place }}\uc640 {{ $json.img_ai }} \uc815\ubcf4\ub97c \ub2f5\ubcc0\uc5d0 \ud65c\uc6a9\ud558\uc5ec \ubbfc\uc6d0 \ub0b4\uc6a9\uc744 \uc815\ud655\ud788 \uc778\uc9c0\ud588\uc74c\uc744 \ubcf4\uc5ec\uc900\ub2e4.\n2.{{ $json.img_status }}\uac00 '\uc624\ub958_\uc2a4\ud338'\uc77c \uacbd\uc6b0, \uc758\ubbf8 \uc5c6\ub294 \ubbfc\uc6d0\uc744 \ud310\ub2e8\ud55c\ub2e4.\n\n------------------------------------------------\n[3\ub2e8\uacc4] \uc694\uc57d\ubcf8 \uc0dd\uc131\n\ubbfc\uc6d0 \uc81c\ubaa9({{ $json.title }})\uacfc \ubbfc\uc6d0 \ub0b4\uc6a9({{ $json.content }})\uc744 \ubd84\uc11d\ud558\uc5ec, \ubcf8 \ubbfc\uc6d0\uc744 \uc694\uc57d\ud558\ub77c. \uc544\ub798 \"\uc694\uc57d\ubcf8 \uc0dd\uc131 \uc2dc \uaddc\uce59\"\uc744 \ubc18\ub4dc\uc2dc \uc774\ud589\ud574\uc57c \ud55c\ub2e4.\n\n[\uc694\uc57d\ubcf8 \uc0dd\uc131 \uc2dc \uaddc\uce59]\n1. \ub2e4\uc74c \uc815\ubcf4\ub97c \ud3ec\ud568\ud558\ub77c.\n- \ubbfc\uc6d0\uc774 \uc81c\uae30\ub41c \ub300\uc0c1 \ub610\ub294 \uc704\uce58\n- \ubb38\uc81c\uc758 \uc6d0\uc778 \ub610\ub294 \uc0c1\ud669 \uc124\uba85\n\n2. \ub2e4\uc74c \ud45c\ud604\uc740 \uc81c\uc678\ud558\ub77c.\n- \ubbfc\uc6d0\uc778\uc774 \uc694\uad6c\ud558\ub294 \uc870\uce58\ub098 \ud574\uacb0 \uc694\uccad\n- \uac10\uc815\uc801 \ud45c\ud604, \uc778\uc0ac\ub9d0, \ubc18\ubcf5 \ubb38\uc7a5\n\n3. \ub2e4\uc74c \ud45c\ud604 \uc9c0\uce68\uc744 \uc9c0\ucf1c\ub77c.\n- \uae00\uba38\ub9ac \uae30\ud638 \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uac01 \ubb38\uc7a5\uc744 \ud45c\ud604\ud558\ub77c.\n- \uac1d\uad00\uc801\uc774\uace0 \ud589\uc815 \ubb38\uc11c\uc5d0 \uc801\ud569\ud55c \uc11c\uc220\uccb4\ub85c \uc791\uc131\ud558\ub77c.\n- \uc694\uc57d\ubb38\ub9cc \uc81c\uc2dc\ud558\uba70, \ub2e4\ub978 \uc124\uba85\uc774\ub098 \ubd84\uc11d\uc740 \ud3ec\ud568\ud558\uc9c0 \ub9d0\ub77c.\n\n-------------------------------------------------\n[4\ub2e8\uacc4] \uc758\ubbf8 \uc5c6\ub294 \uc2a4\ud338\uc131 \ubbfc\uc6d0 \ud310\ub2e8\n- \ubbfc\uc6d0 \uc81c\ubaa9(title)\uacfc \ub0b4\uc6a9(content)\uc774 \uc815\uc0c1\uc801\uc774\uace0 \uc758\ubbf8\uac00 \uc788\uc744 \ub54c\ub9cc `answer VectorDB` \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud55c\ub2e4.\n- \uc544\ub798 \uc870\uac74 \uc911 \ud558\ub098\ub77c\ub3c4 \ud574\ub2f9\ud558\uba74 \u201c\uc758\ubbf8 \uc5c6\ub294 \ubbfc\uc6d0\u201d\uc73c\ub85c \uac04\uc8fc\ud558\uba70 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4:\n  1) title \ub610\ub294 content\uac00 \ube44\uc5b4\uc788\uc74c\n  2) title \ub610\ub294 content\uac00 \"-\", \".\", \"~\", \"?\", \"!\" \ub4f1 \uc758\ubbf8 \uc5c6\ub294 \ubb38\uc790\ub85c\ub9cc \uad6c\uc131\ub428\n  3) title \ub610\ub294 content\uc758 \uae38\uc774\uac00 3\uc790 \ubbf8\ub9cc\n  4) title + content\uac00 \uc0ac\uc2e4\uc0c1 \uc758\ubbf8 \uc5c6\ub294 \uc870\ud569(\uc608: \u201c\u3134-\u201d, \u201c\uc548\ub155\u201d, \u201c\ud14c\uc2a4\ud2b8\u201d, 1~2\uc790 \ub2e8\ubb38 \ub4f1)\n\n- \u201c\uc758\ubbf8 \uc5c6\ub294 \ubbfc\uc6d0\u201d\uc73c\ub85c \ud310\ub2e8\ub418\uba74:\n  - VectorDB \uac80\uc0c9\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\ub294\ub2e4.\n  - related_ids\ub294 \ubc18\ub4dc\uc2dc \ube48 \ubc30\uc5f4([])\uc744 \uc0ac\uc6a9\ud55c\ub2e4.\n  - \ucd9c\ub825 \ud615\uc2dd\uc758 \"is_spam_complaint\"\uc758 \uac12\uc744 \"true\"\ub85c \uc124\uc815\ud55c\ub2e4. \n  \n\n- \u201c\uc815\uc0c1 \ubbfc\uc6d0\u201d\uc73c\ub85c \ud310\ub2e8\ub418\uba74:\n  - \ubbfc\uc6d0 \uc81c\ubaa9\uacfc \ub0b4\uc6a9({{ $json.title }} + {{ $json.content }})\uc744 \uadf8\ub300\ub85c \uac80\uc0c9 \ucffc\ub9ac\ub85c \uc0ac\uc6a9\ud558\uc5ec `answer VectorDB` \ub3c4\uad6c\ub97c \ud638\ucd9c\ud55c\ub2e4.\n  - \ub3c4\uad6c\uc5d0\uc11c \ubc18\ud658\ub41c \uc720\uc0ac \ubb38\uc11c\uc758 UUID(point_id) \ubc30\uc5f4\uc744 \uc0ac\uc6a9\ud558\uc5ec related_ids\ub97c \uad6c\uc131\ud55c\ub2e4.\n  - \uc720\uc0ac \ubb38\uc11c\uac00 \uc5c6\uc73c\uba74 \ube48 \ubc30\uc5f4([])\uc744 \uc0ac\uc6a9\ud55c\ub2e4.\n  - \ucd9c\ub825 \ud615\uc2dd\uc758 \"is_spam_complaint\"\uc758 \uac12\uc744 \"false\"\ub85c \uc124\uc815\ud55c\ub2e4. \n-------------------------------------------------\n[5\ub2e8\uacc4] \uc545\uc131 \ubbfc\uc6d0 \ud310\ub2e8\n\uc544\ub798 \ud45c\ud604 \uc911 \ud558\ub098\ub77c\ub3c4 \ud3ec\ud568\ud558\uba74 \uc545\uc131 \ubbfc\uc6d0\uc73c\ub85c \ubd84\ub958\ud558\ub77c.\n- \uc695\uc124\n- \ubaa8\uc695\n- \uc778\uc2e0\uacf5\uaca9\n- \ube44\ud558\n- \uc704\ud611\n- \ud3ed\uc5b8\n- \ubc94\uc8c4 \uc554\uc2dc\n- \ud2b9\uc815 \uac1c\uc778 \ub610\ub294 \uacf5\ubb34\uc6d0 \ub2e8\uccb4\uc5d0 \ub300\ud55c \uc870\ub871 \ub610\ub294 \uc545\uc758\uc801 \ube44\ub09c\n\uc545\uc131 \ubbfc\uc6d0\uc5d0 \ud574\ub2f9\ud560 \uacbd\uc6b0, \ucd9c\ub825 \ud615\uc2dd\uc758 \"is_devil_complaint\"\uc758 \uac12\uc744 \"true\"\ub85c \uc124\uc815\ud55c\ub2e4. \uc5c6\ub2e4\uba74 \"false\"\ub85c \uc124\uc815\ud55c\ub2e4.\n\n-------------------------------------------------\n[\ucd9c\ub825 \ud615\uc2dd]\n- \ucd9c\ub825\uc740 \ubc18\ub4dc\uc2dc \uc544\ub798 \uad6c\uc870\ub97c \ub530\ub77c\uc57c \ud558\uba70, \ud0a4 \uc21c\uc11c\uc640 \uad6c\uc870\ub97c \uc808\ub300 \ubcc0\uacbd\ud558\uc9c0 \uc54a\ub294\ub2e4.\n- \ud0a4\uc758 \uc774\ub984\uc744 \uc544\ub798 \uba85\uc2dc\ud55c\ub300\ub85c \uc815\ud655\ud788 \uc9c0\uc815\ud55c\ub2e4.\n\n{\n  \"id\": \"{{ $json.id }}\",\n  \"ai_ans_content\": \"AI \uc0dd\uc131 \ub2f5\ubcc0\",\n  \"recommended_dept\": [\"\ucd94\ucc9c\ud558\ub294 \ubd80\uc11c1\", \"\ucd94\ucc9c\ud558\ub294 \ubd80\uc11c2, ...],\n  \"emotion\": \"\ubbfc\uc6d0 \uae00\uc5d0\uc11c \ub290\uaef4\uc9c0\ub294 \uac10\uc815\",\n  \"emotion_reason\": \"\uac10\uc815 \ud310\ub2e8 \uc774\uc720\",\n  \"keywords\": [\"\ud0a4\uc6cc\ub4dc1\", \"\ud0a4\uc6cc\ub4dc2\", \"\ud0a4\uc6cc\ub4dc3\", ...],\n  \"related_ids\": [\"{{ $json.id }}\", ...],\n  \"ai_summary\": \"AI \uc694\uc57d \ub0b4\uc6a9\",\n  \"is_spam_complaint\": \"\uc2a4\ud338\uc131 \ubbfc\uc6d0 \uc5ec\ubd80\"\n  \"is_devil_complaint\": \"\uc545\uc131 \ubbfc\uc6d0 \uc5ec\ubd80\"\n}\n\n-------------------------------------------------\n[\ubd80\uc11c \uc815\ubcf4]\n\uc544\ub798\uc640 \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \uc815\ub9ac\ub418\uc5b4 \uc788\uc74c\n{\n  division1: [department1, ...],\n  division2: [department1, ...],\n  ...\n}\n[\ubaa9\ub85d]\n{\n  \uae30\ud68d\uacbd\uc81c\uad6d: [\uae30\ud68d\uc804\ub7b5\uacfc,\ub514\uc9c0\ud138\uc815\ubcf4\uacfc,\ud64d\ubcf4\ubbf8\ub514\uc5b4\uacfc,\uc77c\uc790\ub9ac\uc9c0\uc6d0\uacfc,\uacbd\uc81c\uc9c0\uc6d0\uacfc],\n  \ud589\uc815\uad50\uc721\uad6d: [\ucd1d\ubb34\uacfc,\ud3c9\uc0dd\uad50\uc721\uacfc,\uc885\ud569\ubbfc\uc6d0\uacfc,\uc138\ubb34\uacfc,\uc9d5\uc218\uacfc,\ud68c\uacc4\uacfc],\n  \ubcf5\uc9c0\uc99d\uc9c4\uad6d: [\ubcf5\uc9c0\uc815\ucc45\uacfc,\uc5b4\ub974\uc2e0\uc7a5\uc560\uc778\uacfc,\uc544\ub3d9\uac00\uc871\uacfc,\ud589\ubcf5\uac00\uc871\uacfc,\ud589\ubcf5\ub098\ub214\uacfc,\uc704\uc0dd\uacfc],\n  \ubb38\ud654\ud658\uacbd\uad6d: [\ubb38\ud654\uad00\uad11\uacfc,\uccb4\uc721\uccad\uc18c\ub144\uacfc,\uad50\ud1b5\ud589\uc815\uacfc,\uc8fc\ucc28\uad00\ub9ac\uacfc,\uccad\uc11c\uacfc,\uae30\ud6c4\ud658\uacbd\uacfc], \n  \ub3c4\uc2dc\ucc3d\uc870\uad6d: [\ub3c4\uc2dc\ub514\uc790\uc778\uacfc,\uacf5\uc6d0\ub179\uc9c0\uacfc,\uc548\uc804\ub3c4\uc2dc\uacfc,\uac74\uc124\uacfc,\uac74\ucd95\uacfc,\ud1a0\uc9c0\uc815\ubcf4\uacfc],\n  \ubcf4\uac74\uc18c: [\ubcf4\uac74\ud589\uc815\uacfc,\uac74\uac15\uc99d\uc9c4\uacfc,\uc131\uc11c\ubcf4\uac74\uc9c0\uc18c]\n}\n\n-------------------------------------------------\n[\ucd94\uac00 \uaddc\uce59]\n1. JSON \uc678 \ud14d\uc2a4\ud2b8\ub098 \uc8fc\uc11d\uc740 \uc808\ub300 \ucd9c\ub825\ud558\uc9c0 \uc54a\ub294\ub2e4.  \n2. ai_ans_content\ub294 3~5\ubb38\uc7a5 \uc774\ub0b4\ub85c \uc791\uc131\ud55c\ub2e4.\n3. recommended_dept\ub294 \ubaa8\ub450 \ud5c8\uc6a9 \ubaa9\ub85d \ub0b4 \ubd80\uc11c\uc5ec\uc57c \ud55c\ub2e4.\n4. recommended_dept\ub294 \uac00\uc7a5 \ud655\uc2e0\ud558\ub294 \ubd80\uc11c \uc21c\uc73c\ub85c \uc4f4\ub2e4.\n5. emotion\uc740 \ubc18\ub4dc\uc2dc \ub2e8\uc77c \uac10\uc815 \ub2e8\uc5b4\ub85c\ub9cc \uc791\uc131\ud55c\ub2e4.\n6. emotion_reason\uc740 \ub17c\ub9ac\uc801\uc73c\ub85c \ud0c0\ub2f9\ud55c \uc774\uc720\ub97c \uac04\uacb0\ud558\uac8c \uc4f4\ub2e4. \n7. related_ids\uac00 \uc5c6\uc73c\uba74 \ube48 \ubc30\uc5f4([])\ub85c \ub454\ub2e4.\n8. related_ids\ub294 metadata\uc758 id \ud0a4\ub97c \uae30\ubc18\uc73c\ub85c \uc81c\uc548\ud574\uc57c \ud55c\ub2e4.\n",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        -368,
        1744
      ],
      "id": "169ca66c-c8ff-40c7-bc20-f58ce74c243a",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "content": "### Role\n- \uc720\uc0ac \uc0ac\ub840 \uac80\uc0c9\n- \ubd80\uc11c \ucd94\ucc9c\n- \uac10\uc815 \ubd84\uc11d",
        "height": 112,
        "width": 224
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        1632
      ],
      "typeVersion": 1,
      "id": "a29a0333-34a1-4def-b4ed-ea6ef7cc4426",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "### Role\n- Web->Workflow",
        "height": 80,
        "width": 182
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1824,
        1680
      ],
      "typeVersion": 1,
      "id": "1d315b70-7834-4a55-9a73-2fe758d9d87f",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "### Role\n- \uc2e0\uaddc \ubbfc\uc6d0 \ubca1\ud130 \uc800\uc7a5",
        "height": 592,
        "width": 486,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        2320
      ],
      "typeVersion": 1,
      "id": "de1f3410-ea8c-4838-8343-2d9714165c19",
      "name": "Sticky Note8"
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        -720,
        2608
      ],
      "id": "03bb31c3-a665-4d4f-9d85-c842a3894f85",
      "name": "Upstage Embed for Agent",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonMode": "expressionData",
        "jsonData": "={{ $('Code in JavaScript3').item.json.content }}",
        "textSplittingMode": "custom",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "id",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.id }}"
              },
              {
                "name": "author",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.author }}"
              },
              {
                "name": "phone",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.phone }}"
              },
              {
                "name": "title",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.title }}"
              },
              {
                "name": "attachment",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.attachment }}"
              },
              {
                "name": "created_date",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.created_date }}"
              },
              {
                "name": "category",
                "value": "={{ $('Code in JavaScript3').item.json.metadata.category }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        -544,
        2608
      ],
      "id": "23daefbe-71cb-4ade-b828-351be091777d",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        -512,
        2176
      ],
      "id": "f49c33ad-5edf-4a6c-8d89-0dacac90200a",
      "name": "Upstage Embed for Agent3",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        -192,
        2176
      ],
      "id": "c9f43889-f76c-4d69-948a-9992f53c1104",
      "name": "Upstage Embed for Agent1",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        2672,
        1936
      ],
      "id": "1d12b3eb-3618-492a-81f2-ce33da6a7848",
      "name": "Upstage Embed for Agent4",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonMode": "expressionData",
        "jsonData": "={{ $('Code in JavaScript7').item.json.emotion_reason }}",
        "textSplittingMode": "custom",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "id",
                "value": "={{ $('Code in JavaScript7').item.json.id }}"
              },
              {
                "name": "emotion",
                "value": "={{ $('Code in JavaScript7').item.json.emotion }}"
              },
              {
                "name": "emotion_reason",
                "value": "={{ $('Code in JavaScript7').item.json.emotion_reason }}"
              },
              {
                "name": "keywords",
                "value": "={{ $('Code in JavaScript7').item.json.keywords }}"
              },
              {
                "name": "recommended_dept",
                "value": "={{ $('Code in JavaScript7').item.json.recommended_dept }}"
              },
              {
                "name": "related_ids",
                "value": "={{ $('Code in JavaScript7').item.json.related_ids }}"
              },
              {
                "name": "is_devil_complaint",
                "value": "={{ $('Code in JavaScript7').item.json.is_devil_complaint }}"
              },
              {
                "name": "is_spam_complaint",
                "value": "={{ $('Code in JavaScript7').item.json.is_spam_complaint }}"
              },
              {
                "name": "date",
                "value": "={{ $('Code in JavaScript7').item.json.date }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        2800,
        1936
      ],
      "id": "2f2d42ad-2db1-4f85-8fc4-5ca5fece2244",
      "name": "Default Data Loader2"
    },
    {
      "parameters": {
        "content": "### Role\n- \ub2f4\ub2f9\uc790 \ubc30\uc815 \ucc38\uace0\uc6a9 \ub370\uc774\ud130 \uc800\uc7a5(\ubd80\uc11c\ucd94\ucc9c,\ubd84\uc704\uae30,\uc720\uc0ac\uc0ac\ub840IDs \ub4f1)",
        "height": 608,
        "width": 432,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2624,
        1648
      ],
      "id": "df958b7b-97b1-4bce-b5d0-40330d3a3c5e",
      "name": "Sticky Note11"
    },
    {
      "parameters": {
        "model": "solar-pro2",
        "options": {}
      },
      "type": "n8n-nodes-upstage.lmChatModelUpstage",
      "typeVersion": 1,
      "position": [
        -688,
        1968
      ],
      "id": "9c372f60-df9d-4909-afa3-7deb97d460df",
      "name": "Upstage Solar Chat for Agent",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        2688,
        2576
      ],
      "id": "310a4b11-204a-48d5-be3e-e89b9e41144f",
      "name": "Upstage Embed for Agent6",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonMode": "expressionData",
        "jsonData": "={{ $('Code in JavaScript5').item.json.ai_ans_content }}",
        "textSplittingMode": "custom",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "id",
                "value": "={{ $('Code in JavaScript5').item.json.id }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        2800,
        2576
      ],
      "id": "e0d1d4d5-3b13-42dc-bb1c-3d3620fa7a4a",
      "name": "Default Data Loader3"
    },
    {
      "parameters": {
        "content": "### Role\n- AI \uc0dd\uc131 \ub2f5\ubcc0 \uc800\uc7a5",
        "height": 624,
        "width": 432,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2624,
        2272
      ],
      "id": "ccff503e-dd3b-4074-ba07-fd5e88a46791",
      "name": "Sticky Note12"
    },
    {
      "parameters": {
        "content": "## TODO\n- (n8n) \uc6cc\ud06c\ud50c\ub85c\uc6b0 \ub3d9\uc791 \ubc0f \ud488\uc9c8 \ud14c\uc2a4\ud2b8 \u2705\n- (Web) DB -> Admin \ud398\uc774\uc9c0 \ucd9c\ub825 \uad6c\ud604 \u2705\n- (Web) \ubbfc\uc6d0 \uc81c\ucd9c \ubc84\ud2bc \ud074\ub9ad \uc2dc \ud31d\uc5c5\ucc3d \ub2e4\ub4ec\uae30(\uc608: \ubb38\uad6c \ubcc0\uacbd, IP \uc8fc\uc18c \uac00\ub9ac\uae30) \u2705\n- (Web) '\ucd5c\uadfc \uc811\uc218\ub41c \ubbfc\uc6d0' \ubaa9\ub85d \ucd9c\ub825 \uc815\uc0c1\ud654 \u2705\n  - \ubbfc\uc6d0 ID \uc815\uc0c1\ud654\n- (Web) '\ubbfc\uc6d0 \uc0c1\uc138 \ucc98\ub9ac' \ud31d\uc5c5\ucc3d \ub108\ube44 \ub113\ud788\uae30 \u2705\n- (Web) Admin \ud654\uba74 \ub354\ubbf8 \uae00 \ub450 \uac1c \uc0ad\uc81c \u2705\n- (Web) \ubbfc\uc6d0 \ub300\uc2dc\ubcf4\ub4dc \uc6b0\uc0c1\ub2e8 \ud504\ub85c\ud544 \uc774\ubbf8\uc9c0 \uae68\uc9c0\ub294\uac70 \uc218\uc815 \u2705\n- (Web) '\uc804\uccb4 \ubbfc\uc6d0' \uceec\ub7fc \uac04\uaca9 \ub2e4\ub4ec\uae30 \u2705\n- (n8n) AI Summary \ub178\ub4dc \ucd94\uac00 \u2705\n- (Web) '\uc0c1\uc138 \ubbfc\uc6d0 \ucc98\ub9ac' \ud31d\uc5c5\ucc3d \ub808\uc774\uc544\uc6c3 \ubcc0\uacbd \u2705\n- (n8n) \ubbfc\uc6d0 \ub0b4\uc6a9\uc774 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc744 \ub54c, \ub300\uc751\ud558\ub294 \uc6cc\ud06c\ud50c\ub85c\uc6b0 \ud544\uc694 \u2705\n- (Web) \ucc98\ub9ac \uc644\ub8cc \ubc84\ud2bc \ub204\ub97c \uc2dc \uc5d0\ub7ec \ubc1c\uc0dd \ubb38\uc81c \ud574\uacb0 \u2705\n\n### \uace0\ub3c4\ud654\n- \uc774\ubbf8\uc9c0\ub3c4 AI \uc5d0\uc774\uc804\ud2b8\uac00 \ud65c\uc6a9\ud558\ub3c4\ub85d \uc6cc\ud06c\ud50c\ub85c\uc6b0 \uad6c\uc131 \u2705\n- \uc0d8\ud50c \ub370\uc774\ud130 \ud65c\uc6a9\ud574 \ucd94\ucc9c \ubd80\uc11c \uc131\ub2a5 \ud3c9\uac00 \ud83d\udd04\n  - \ud30c\uc774\uc36c \uc2a4\ud06c\ub9bd\ud2b8 \uc791\uc131 \ud544\uc694\n---\n\n## ISSUE\n- (ID\ud560\ub2f9) \uacc4\uc18d \uac19\uc740 ID\uac00 \ud560\ub2f9\ub428 \u2705\n  - TODO: API \ub2e8\uc5d0\uc11c ID \ud560\ub2f9",
        "height": 800,
        "width": 614
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3104,
        1648
      ],
      "typeVersion": 1,
      "id": "ab8a1cff-321a-44e0-8ee3-44e4c201541e",
      "name": "Sticky Note10"
    },
    {
      "parameters": {
        "chunkSize": 10000
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -544,
        2784
      ],
      "id": "06bc99c7-e8f3-4ae0-af36-e0201fce9c7c",
      "name": "Character Text Splitter"
    },
    {
      "parameters": {
        "chunkSize": 10000
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        2800,
        2768
      ],
      "id": "c910b0e8-6c59-4245-bd35-eadc073994e6",
      "name": "Character Text Splitter1"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "\ubbfc\uc6d0\uc5d0 \ub300\ud55c \uae30\uad00\uc758 \uacf5\uc2dd \ub2f5\ubcc0 \ub610\ub294 \ucc98\ub9ac \uacb0\uacfc\ub97c \uac80\uc0c9\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc9c8\ubb38\uc5d0 \ub300\uc751\ub418\ub294 \ub2f5\ubcc0\uc774\ub098 \uc720\uc0ac\ud55c \uc0ac\ub840\ub97c \ucc3e\uc744 \ub54c \ud65c\uc6a9\ud569\ub2c8\ub2e4.",
        "qdrantCollection": {
          "__rl": true,
          "value": "answer",
          "mode": "list",
          "cachedResultName": "answer"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -192,
        2032
      ],
      "id": "24fa2ddb-4c77-4294-bd80-b0f4cadefe79",
      "name": "answer VectorDB",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "\uc2dc\ubbfc\uc774 \uc81c\ucd9c\ud55c \ubbfc\uc6d0 \uc81c\ubaa9\uacfc \ub0b4\uc6a9\uc744 \uac80\uc0c9\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc9c8\ubb38\uc774 \u2018\uc5b4\ub5a4 \ubbfc\uc6d0 \ub0b4\uc6a9\uacfc \uad00\ub828\ub41c \uac83\uc778\uc9c0\u2019\ub97c \ud30c\uc545\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.",
        "qdrantCollection": {
          "__rl": true,
          "value": "complaint",
          "mode": "list",
          "cachedResultName": "complaint"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -512,
        2032
      ],
      "id": "9f56f867-02c8-414e-95b0-90bd24eee48b",
      "name": "complaint VectorDB",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "complaint"
        },
        "options": {
          "contentPayloadKey": "content",
          "metadataPayloadKey": "metadata"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -720,
        2384
      ],
      "id": "0afbeeab-d7bf-452c-aa78-6832fb3e1233",
      "name": "new complaint store",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "value": "ai_answer",
          "mode": "list",
          "cachedResultName": "ai_answer"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        2688,
        2352
      ],
      "id": "a8615298-8ba3-4a88-b962-ce54a0462969",
      "name": "ai_answer store",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "value": "agent",
          "mode": "list",
          "cachedResultName": "agent"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        2672,
        1712
      ],
      "id": "49e82055-797a-48b9-bd6c-d27cba81a278",
      "name": "agent store",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chunkSize": 10000
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        2800,
        2112
      ],
      "id": "205f22e9-c053-4cd0-b0d6-e4275c113cae",
      "name": "Character Text Splitter2"
    },
    {
      "parameters": {
        "content": "### Role\n- \uc720\uc0ac '\ubbfc\uc6d0' \uc0ac\ub840 \uac80\uc0c9",
        "height": 352,
        "width": 304,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        1952
      ],
      "typeVersion": 1,
      "id": "0d05e7f3-1051-4e1c-9580-ea9e24e6c38d",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "### Role\n- \uc720\uc0ac '\ub2f5\ubcc0' \uc0ac\ub840 \uac80\uc0c9",
        "height": 352,
        "width": 304,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1952
      ],
      "typeVersion": 1,
      "id": "fcc55e0f-654f-48fa-9af2-d7dbf6a2a379",
      "name": "Sticky Note13"
    },
    {
      "parameters": {
        "content": "### Role\n- STR -> JSON",
        "height": 80,
        "width": 150,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        1664
      ],
      "typeVersion": 1,
      "id": "56574bff-e983-4813-adbe-205ca73d55ea",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "### \u26a0 CAUTION\n- related_ids\uac00 point_id \ud615\uc2dd\uc774\uace0, \ud560\ub8e8\uc2dc\ub124\uc774\uc158 \uc758\uc2ec\n- \ucc98\ub9ac\uad6d\uc740 \ucd94\ucc9c \ubd80\uc11c\uc5d0 \uc791\uc131\ud558\uc9c0 \ub9d0\ub77c\uace0 \ud588\uc73c\ub098, \ubb34\uc2dc\ub428",
        "height": 96,
        "width": 422,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        1536
      ],
      "typeVersion": 1,
      "id": "4ab7e766-e9be-47de-b392-c8eedbb3d433",
      "name": "Sticky Note14"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n\nreturn items.map(item => {\n  const data = item.json;\n  \n  return {\n    json: {\n      content: `${data.content}`,\n      metadata: {\n        id: data.id,\n        author: data.author,\n        phone: data.phone,\n        title: data.title,\n        content: data.content,\n        attachment: data.attachment,\n        created_date: data.created_date,\n        category: data.category\n      }\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1136,
        2384
      ],
      "id": "f9bfd800-bf84-46ee-b730-43f91d837192",
      "name": "Code in JavaScript3"
    },
    {
      "parameters": {
        "content": "### Role\n- POST->JSON",
        "height": 80,
        "width": 182
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        1680
      ],
      "typeVersion": 1,
      "id": "0608063a-5b09-4db4-9194-35cd24ef7d4e",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "jsCode": "// Extract body from the incoming webhook\nconst b = $input.first().json.body;\n\n// Reformat it into the structure you want\nreturn [\n  {\n    json: {\n      id: b.id,\n      author: b.author,\n      phone: b.phone,\n      title: b.title,\n      content: b.content,\n      attachment: b.attachment,\n      created_date: b.created_date,\n      category: b.category\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1472,
        1760
      ],
      "id": "c877a133-c7e6-41c5-97aa-e1ad02bb007e",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "content": "### Role\n- JSON->Document",
        "height": 80,
        "width": 182
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        2304
      ],
      "typeVersion": 1,
      "id": "92c3b0d7-003b-4561-bbe1-74001c5006a7",
      "name": "Sticky Note15"
    },
    {
      "parameters": {
        "content": "### Role\n- AI \uc694\uc57d \uc800\uc7a5",
        "height": 624,
        "width": 432,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2624,
        2912
      ],
      "id": "61b1c6be-27ce-48a5-b82e-2a3f164764c1",
      "name": "Sticky Note16"
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        2688,
        3216
      ],
      "id": "cde9ebcc-410c-4c99-9d6d-11cbaed8c0c0",
      "name": "Upstage Embed for Agent2",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonMode": "expressionData",
        "jsonData": "={{ $('Code in JavaScript5').item.json.ai_summary }}",
        "textSplittingMode": "custom",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "id",
                "value": "={{ $('Code in JavaScript5').item.json.id }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        2816,
        3216
      ],
      "id": "b5fef064-6043-48db-bade-74cdb79995ed",
      "name": "Default Data Loader1"
    },
    {
      "parameters": {
        "chunkSize": 10000
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        2816,
        3408
      ],
      "id": "a79a122f-aaee-4496-a8ad-05489864270c",
      "name": "Character Text Splitter3"
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "value": "ai_summary",
          "mode": "list",
          "cachedResultName": "ai_summary"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        2688,
        3008
      ],
      "id": "5bfb1ecc-148b-489a-ba61-b2da3564a536",
      "name": "ai_summary store",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "point",
        "operation": "retrievePoint",
        "collectionName": {
          "__rl": true,
          "value": "answer",
          "mode": "list",
          "cachedResultName": "answer"
        },
        "id": "={{ $json.related_ids }}",
        "requestOptions": {}
      },
      "type": "n8n-nodes-qdrant.qdrant",
      "typeVersion": 1,
      "position": [
        1600,
        1392
      ],
      "id": "b8b6730c-b264-4af8-bb28-33cd90116e0b",
      "name": "Retrieve Points1",
      "credentials": {
        "qdrantRestApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "fieldToSplitOut": "related_ids",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        880,
        1488
      ],
      "id": "aa2fc917-b5df-41a4-b868-413f8b6b3c97",
      "name": "Split Out"
    },
    {
      "parameters": {
        "jsCode": "// 1) Split Out\uc5d0\uc11c \ub098\uc628 UUID\ub4e4(\ubc31\uc5c5\uc6a9)\nconst uuids = $items('Split Out').map(it => it.json.related_ids);\n\n// 2) Qdrant \uc751\ub2f5\ub4e4\uc5d0\uc11c metadata.id\ub9cc \ubf51\ub418, \uc5c6\uc73c\uba74 \uc6d0\ub798 uuid\ub85c \ub300\uccb4\nconst ids = $input.all().map((it, i) => {\n  const j = it.json;\n  return j?.result?.payload?.metadata?.id\n      ?? j?.payload?.metadata?.id\n      ?? uuids[i];\n});\n\n// 3) \ub2e4\uc74c \ub178\ub4dc\ub85c \ub118\uae38 \ub2e8\uc77c \uc544\uc774\ud15c\nreturn { json: { related_ids: ids } };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1824,
        1216
      ],
      "id": "9ef74e73-3ae5-41c1-b648-a9a2d70d439e",
      "name": "Code in JavaScript2"
    },
    {
      "parameters": {
        "jsCode": "// \ubaa8\ub4e0 \uc785\ub825 \uc544\uc774\ud15c \uac00\uc838\uc624\uae30\nconst items = $input.all();\n\n// \uad00\ub828 id \ucd94\ucd9c\nconst relatedList = items\n  .map(i => i.json.related_ids)\n  .filter(v => v !== undefined && v !== null)\n  .flat();   // \u2190 \ud575\uc2ec: \uc774\uc911 \ubc30\uc5f4\uc744 \ud55c \ub2e8\uacc4 \ud3c9\ud0c4\ud654\n\n// \ub2e8\uc77c \uc544\uc774\ud15c\uc73c\ub85c \ubc18\ud658\nreturn [\n  {\n    json: {\n      related_ids: relatedList\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2000,
        1216
      ],
      "id": "4536f5d8-e37f-4af1-a198-c8ed663bdaeb",
      "name": "Code in JavaScript4"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "29400cb7-9536-46e8-bf3b-bb69fab8c005",
              "leftValue": "={{ $json.related_ids.length }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        528,
        1504
      ],
      "id": "0b13fc62-f00b-43c1-9972-1f564d6f311f",
      "name": "If1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2256,
        1728
      ],
      "id": "a035c414-bed6-4321-b61f-09c558b326f0",
      "name": "Merge"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "997a26f8-eaf0-49aa-86e1-9d5710201e0e",
              "leftValue": "={{ $json.related_ids }}",
              "rightValue": "=^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1200,
        1488
      ],
      "id": "b208cd4e-15b1-4558-a898-e3dba1272a07",
      "name": "If2"
    },
    {
      "parameters": {
        "content": "### Role\n- AI Agent\uac00 UUID \ud615\uc2dd\uc73c\ub85c \ucd9c\ub825\ud55c `related_ids`\ub97c `metadata.id` \ud3ec\ub9f7\uc73c\ub85c \ubcc0\ud658",
        "height": 80,
        "width": 768
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        1424
      ],
      "typeVersion": 1,
      "id": "2ae7f977-c40b-43c3-bd62-d1183fe52f51",
      "name": "Sticky Note21"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// \ud604\uc7ac \uc544\uc774\ud15c\nconst data = $json.output;\n\n// JSON \ubb38\uc790\uc5f4 \ud30c\uc2f1\nconst parsed = JSON.parse(data);\n\n// KST \uc2dc\uac04 \uacc4\uc0b0\nconst kst = new Date(Date.now() + 9 * 60 * 60 * 1000);\n\n// yyyy-mm-dd\nconst d = kst.toISOString().split('T')[0];\n// hh:mm:ss\nconst t = kst.toISOString().split('T')[1].split('.')[0];\n\n// date \ud544\ub4dc \ud558\ub098\ub85c \ud569\uce68\nconst date = `${d} ${t}`;\n\nreturn {\n  json: {\n    id: parsed.id,\n    ai_ans_content: parsed.ai_ans_content,\n    ai_summary: parsed.ai_summary,\n    recommended_dept: parsed.recommended_dept,\n    emotion: parsed.emotion,\n    emotion_reason: parsed.emotion_reason,\n    keywords: parsed.keywords,\n    related_ids: parsed.related_ids,\n    date: date,\n    is_devil_complaint: parsed.is_devil_complaint,\n    is_spam_complaint: parsed.is_spam_complaint\n  }\n};\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        176,
        1744
      ],
      "id": "982a827f-3e9f-438e-9559-57fda42f908a",
      "name": "Code in JavaScript5"
    },
    {
      "parameters": {
        "content": "### \uc774\ubbf8\uc9c0 URL\n\uc774 \uc788\ub2e4\uba74",
        "height": 80,
        "width": 150,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        816
      ],
      "typeVersion": 1,
      "id": "2e7efa14-7b55-4fc3-a7b0-0728ede35f58",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "816b5608-f3b0-4585-a34a-83e05fd6c4c3",
              "leftValue": "={{ $json.imageUrl }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -576,
        896
      ],
      "id": "130d6eb4-5b43-49e0-82eb-e081ca6da1b2",
      "name": "If4",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=\ub108\ub294 \ubbfc\uc6d0 \uc0ac\uc9c4\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc0ac\ud558\uace0, \ubb38\uc81c\uc810\uacfc \uc7a5\uc18c\ub97c \uc608\uce21\ud558\ub294 \uacf5\uacf5\uae30\uad00 \uc804\uc0b0 \uc2dc\uc2a4\ud15c\uc6a9 AI\uc774\ub2e4. \n\ud56d\uc0c1 \uacf5\ubb34\uc6d0 \uacf5\uc2dd \ubb38\uccb4\ub85c \uc815\uc911\ud558\uace0 \uac04\uacb0\ud558\uac8c \ub2f5\ubcc0\ud55c\ub2e4. \n\ubaa8\ub4e0 \ucd9c\ub825\uc740 \ubc18\ub4dc\uc2dc JSON \uac1d\uccb4 \ud558\ub098\ub9cc \ubc18\ud658\ud558\uba70, JSON \uc678\uc758 \ucd94\uac00 \uc124\uba85, \ubb38\uc7a5, \uc5ec\ub294 \ub9d0, \ub2eb\ub294 \ub9d0\uc744 \uc808\ub300 \ud3ec\ud568\ud558\uc9c0 \uc54a\ub294\ub2e4.\n\n[\uc785\ub825 \ub370\uc774\ud130 \ud615\uc2dd] \uc0ac\uc9c4 \uc815\ubcf4:\n\n\"imageUrl\" : {{$json.imageUrl}} \n\n\ubbfc\uc6d0 \uc815\ubcf4 :\n\"title\" : {{$json.title}}\n\"content\" : {{$json.content}}\n\n[1\ub2e8\uacc4] \uc774\ubbf8\uc9c0 \uc720\ud6a8\uc131 \ubd84\uc11d \uc0ac\uc9c4 \uc815\ubcf4(imageUrl)\ub97c \ubbfc\uc6d0 \uc815\ubcf4(title, content)\uc640 \ube44\uad50\ud558\uc5ec \ub2e4\uc74c \ud56d\ubaa9\uc744 \ud310\ub2e8\ud558\ub77c.\nimage_status: \uc774\ubbf8\uc9c0\uc758 \uc0c1\ud0dc\ub97c \ub2e4\uc74c \uc911 \ud558\ub098\ub85c \ubd84\ub958\ud55c\ub2e4.\n\"\uc815\uc0c1\": \ubbfc\uc6d0 \ub0b4\uc6a9\uacfc \uad00\ub828\uc131\uc774 \uc788\uc73c\uba70 \ubd84\uc11d \uac00\ub2a5\ud55c \uc774\ubbf8\uc9c0.\n\"\uc624\ub958_\uad00\ub828\uc131_\ub0ae\uc74c\": \uc774\ubbf8\uc9c0 \uc790\uccb4\ub294 \uc2dd\ubcc4 \uac00\ub2a5\ud558\ub098, \ubbfc\uc6d0(title, content) \ub0b4\uc6a9\uacfc \uc804\ud600 \ubb34\uad00\ud55c \uacbd\uc6b0 (\uc608: \ubbfc\uc6d0\uc740 \ubca4\uce58 \ud30c\uc190\uc778\ub370 \uc0ac\uc9c4\uc740 \ub3c4\ub85c \ud30c\uc190).\n\"\uc624\ub958_\uc2a4\ud338\": \uad11\uace0, \uc74c\ub780\ubb3c, \ud64d\ubcf4\uc131 \uc804\ub2e8 \ub4f1 \ubbfc\uc6d0\uacfc \ubb34\uad00\ud55c \uc2a4\ud338\uc131 \uc774\ubbf8\uc9c0. + \ubbfc\uc6d0\uacfc \uc0c1\uad00\uc5c6\ub294 \uc774\ubbf8\uc9c0.\n\"\uc624\ub958_\ubd84\uc11d_\ubd88\uac00\": \uc774\ubbf8\uc9c0\uac00 \uae68\uc84c\uac70\ub098, \uc644\uc804\ud788 \uac80\uc740\uc0c9/\ud770\uc0c9\uc774\uac70\ub098, \ud615\uccb4\ub97c \ub3c4\uc800\ud788 \uc54c\uc544\ubcfc \uc218 \uc5c6\ub294 \uacbd\uc6b0.\n\n[2\ub2e8\uacc4] \uc7a5\uc18c \ubc0f \ubb38\uc81c\uc810 \ubd84\uc11d (\uc870\uac74\ubd80) image_status\uac00 **\"\uc815\uc0c1\"**\uc77c \uacbd\uc6b0\uc5d0\ub9cc \ub2e4\uc74c\uc744 \uc218\ud589\ud55c\ub2e4.\nplace: \uc0ac\uc9c4\uc5d0 \uc788\ub294 \ud14d\uc2a4\ud2b8, \ud45c\uc9c0\ud310, \uac74\ubb3c, \uc8fc\ubcc0 \ud658\uacbd \ub4f1\uc744 \ubc14\ud0d5\uc73c\ub85c \uc7a5\uc18c\ub97c \ucd94\uc815\ud55c\ub2e4.\nproblem: \uc0ac\uc9c4\uc5d0\uc11c \uc2dd\ubcc4\ub418\ub294 \ud658\uacbd \ubb38\uc81c \ub610\ub294 \ubbfc\uc6d0 \uc720\ubc1c \uc0ac\ud56d\uc744 \ucd94\uc815\ud55c\ub2e4. (\uc608: \"\ub3c4\ub85c \uc544\uc2a4\ud314\ud2b8 \uade0\uc5f4 \ubc0f \ud30c\uc190\", \"\uac00\ub85c\ub4f1 \uc810\uba78\", \"\uc4f0\ub808\uae30 \ubb34\ub2e8 \ud22c\uae30\")\n\n[3\ub2e8\uacc4] \ub2f5\ubcc0 \uc0dd\uc131 [1\ub2e8\uacc4]\uc640 [2\ub2e8\uacc4]\uc758 \ubd84\uc11d \uacb0\uacfc\ub97c \ubc14\ud0d5\uc73c\ub85c place\uc640 problem \ud544\ub4dc\ub97c \ucc44\uc6b4\ub2e4.\nimage_status\uac00 \"\uc815\uc0c1\"\uc77c \uacbd\uc6b0:\nplace: [2\ub2e8\uacc4]\uc5d0\uc11c \ucd94\uc815\ud55c \uc7a5\uc18c (\uc54c \uc218 \uc5c6\uc73c\uba74 \"\ud2b9\uc815 \ubd88\uac00\")\nproblem: [2\ub2e8\uacc4]\uc5d0\uc11c \ucd94\uc815\ud55c \ubb38\uc81c\uc810 (1~3 \ubb38\uc7a5)\n\nimage_status\uac00 \"\uc815\uc0c1\"\uc774 \uc544\ub2d0 \uacbd\uc6b0:\nplace: \"\ud574\ub2f9 \uc5c6\uc74c\"\nproblem: [1\ub2e8\uacc4] image_status\uc758 \ud310\ub2e8 \uc0ac\uc720\ub97c 1~2 \ubb38\uc7a5\uc73c\ub85c \uc791\uc131\ud55c\ub2e4. (\uc608: \"\ubbfc\uc6d0 \ub0b4\uc6a9\uacfc \ubb34\uad00\ud55c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\", \"\uad11\uace0\uc131 \uc2a4\ud338 \uc774\ubbf8\uc9c0\ub85c \ud310\ub2e8\ub429\ub2c8\ub2e4.\", \"\uc774\ubbf8\uc9c0 \uc2dd\ubcc4\uc774 \ubd88\uac00\ub2a5\ud569\ub2c8\ub2e4.\")\n\n[\ucd9c\ub825 \ud615\uc2dd] \ucd9c\ub825\uc740 \ubc18\ub4dc\uc2dc \uc544\ub798 \uad6c\uc870\ub97c \ub530\ub77c\uc57c \ud558\uba70, \ud0a4 \uc21c\uc11c\uc640 \uad6c\uc870\ub97c \uc808\ub300 \ubcc0\uacbd\ud558\uc9c0 \uc54a\ub294\ub2e4.\n{ \"imageUrl\" : {{$json.imageUrl}}, \"image_status\" : \"...\", \"place\" : \"...\" , \"problem\" : \"...\" }\n\n[\ucd94\uac00 \uaddc\uce59]\n\n1.JSON \uc678 \ud14d\uc2a4\ud2b8\ub098 \uc8fc\uc11d\uc740 \uc808\ub300 \ucd9c\ub825\ud558\uc9c0 \uc54a\ub294\ub2e4.\n2.image_status\ub294 \ubc18\ub4dc\uc2dc [\uc815\uc0c1, \uc624\ub958_\uad00\ub828\uc131_\ub0ae\uc74c, \uc624\ub958_\uc2a4\ud338, \uc624\ub958_\ubd84\uc11d_\ubd88\uac00] \uc911 \ud558\ub098\uc5ec\uc57c \ud55c\ub2e4.\n3.image_status\uac00 \"\uc815\uc0c1\"\uc77c \ub54c place\uac00 \ubd88\uba85\ud655\ud558\uba74 \"\ud2b9\uc815 \ubd88\uac00\"\ub85c, problem\uc740 1~3 \ubb38\uc7a5\uc73c\ub85c \uc791\uc131\ud55c\ub2e4.\n4.image_status\uac00 \"\uc815\uc0c1\"\uc774 \uc544\ub2d0 \ub54c place\ub294 \"\ud574\ub2f9 \uc5c6\uc74c\"\uc73c\ub85c, problem\uc740 \uc624\ub958 \uc0ac\uc720\ub97c 1~2 \ubb38\uc7a5\uc73c\ub85c \uc791\uc131\ud55c\ub2e4.\n",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        -32,
        880
      ],
      "id": "9a50242b-70ec-42fe-8e18-76822d079a64",
      "name": "AI Agent3",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "model": "solar-pro2",
        "options": {}
      },
      "type": "n8n-nodes-upstage.lmChatModelUpstage",
      "typeVersion": 1,
      "position": [
        -80,
        1088
      ],
      "id": "8811eb4c-9549-4598-907d-99689f14b0ee",
      "name": "Upstage Solar Chat for Agent3",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "93973213-2804-4b92-9bf3-306bff7a6c47",
              "name": "img_url",
              "value": "={{ JSON.parse($json.output).imageUrl }}",
              "type": "string"
            },
            {
              "id": "aaf4d388-3a4c-46aa-8987-432c4a049815",
              "name": "img_place",
              "value": "={{ JSON.parse($json.output).place }}",
              "type": "string"
            },
            {
              "id": "2edd2a8b-145c-404d-a33b-4864c954b0d1",
              "name": "img_ai",
              "value": "={{ JSON.parse($json.output).problem }}",
              "type": "string"
            },
            {
              "id": "51a0918d-7ff0-4b67-8220-4518c57ab6c4",
              "name": "img_status",
              "value": "={{ JSON.parse($json.output).image_status }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        352,
        1168
      ],
      "id": "47b6a3cc-ecfa-4d12-9f43-2c3610fb0331",
      "name": "Edit Fields4"
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "analyze",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.5-pro",
          "mode": "list",
          "cachedResultName": "models/gemini-2.5-pro"
        },
        "text": "=\ub108\ub294 \ubbfc\uc6d0 \uc0ac\uc9c4\uc5d0\uc11c \ubb38\uc81c\uc810\uacfc \uc7a5\uc18c\ub97c \uc608\uce21\ud558\ub294 AI\uc774\ub2e4.\n\n-------------------------------------------------\n[\uc785\ub825 \ub370\uc774\ud130 \ud615\uc2dd]\n\uc0ac\uc9c4 \uc815\ubcf4 :\n-  \"imageUrl\" : {{$json.imageUrl}} \n-------------------------------------------------\n[\ucd9c\ub825 \ub370\uc774\ud130 \ud615\uc2dd]\n\uc7a5\uc18c \ucd94\uc815\n- \ub2e8\ub2f5\ud615 \n\ubb38\uc81c\uc810(\ubbfc\uc6d0 \ud30c\uc545)\n- \ubb38\uc7a5 1~3\uac1c\n-------------------------------------------------",
        "imageUrls": "={{ $('If4').item.json.imageUrl }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGeminiTool",
      "typeVersion": 1,
      "position": [
        112,
        1088
      ],
      "id": "4f37c5cc-c503-406d-98b9-323c15a95cd5",
      "name": "Analyze an image in Google Gemini2",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const b = $input.first().json.body;\n\nreturn [\n  {\n    json: {\n      title: b.title,\n      content: b.content,\n      \n      imageUrl: b.attachment\n      \n      /* // \uc544\ub798 \ud544\ub4dc\ub4e4\uc740 \uc81c\uacf5\ub41c \uc608\uc2dc \ub370\uc774\ud130\uc5d0 \uc5c6\uc2b5\ub2c8\ub2e4.\n      // \ub9cc\uc57d \uc774 \ud544\ub4dc\ub4e4\ub3c4 \uc6f9\ud6c5 \ub370\uc774\ud130\uc5d0 \ud3ec\ud568\ub418\uc5b4 \uc788\ub2e4\uba74 \n      // \uc8fc\uc11d\uc744 \ud574\uc81c\ud558\uace0 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n      id: b.id,\n      author: b.author,\n      phone: b.phone,\n      created_date: b.created_date,\n      category: b.category\n      */\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1168,
        896
      ],
      "id": "360ce928-3e3f-4197-a1f8-16f08f2e6ae0",
      "name": "Code in JavaScript6"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -880,
        1744
      ],
      "id": "cab68ba3-0114-423e-b606-dcd89720cc7e",
      "name": "Merge1",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "content": "### Role\n- \uc774\ubbf8\uc9c0 \ubd84\uc11d\uc6a9 \uc804\ucc98\ub9ac",
        "height": 80,
        "width": 182
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        816
      ],
      "typeVersion": 1,
      "id": "fbf4db52-cab1-4cc9-b272-4577348f39c8",
      "name": "Sticky Note17"
    },
    {
      "parameters": {
        "jsCode": "return {\n  json: {\n    id: $input.last().json.id,\n    recommended_dept: $input.last().json.recommended_dept,\n    emotion: $input.last().json.emotion,\n    emotion_reason: $input.last().json.emotion_reason,\n    keywords: $input.last().json.keywords,\n    related_ids: $input.first().json.related_ids,\n    date: $input.last().json.date,\n    is_devil_complaint: $input.last().json.is_devil_complaint,\n    is_spam_complaint: $input.last().json.is_spam_complaint\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2464,
        1712
      ],
      "id": "5d44cb1a-3220-461b-a168-f3afc120eec0",
      "name": "Code in JavaScript7"
    },
    {
      "parameters": {
        "content": "### If \ubbfc\uc6d0 \ubc88\ud638\uac00 \uac00\uc9dc\uc778 \uacbd\uc6b0\n- TODO \uadf8\uc5d0 \ub300\uc751\ud558\uc5ec \ucc98\ub9ac \ud544\uc694",
        "height": 80,
        "width": 272
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        1440
      ],
      "typeVersion": 1,
      "id": "6df8dfbb-83a7-47ef-aed3-f5dfccacb6d5",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst relatedList = items\n  .map(i => i.json.related_ids)\n  .filter(v => v !== undefined && v !== null)\n  .flat();   // \u2190 \ud575\uc2ec\n\nreturn [\n  {\n    json: {\n      related_ids: relatedList\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1600,
        1584
      ],
      "id": "019ef58b-ec70-4ddf-ac28-6ba4825922de",
      "name": "Code in JavaScript8"
    },
    {
      "parameters": {
        "content": "### Role\n- \uc720\uc0ac 'AI \ub2f5\ubcc0' \uc0ac\ub840 \uac80\uc0c9",
        "height": 352,
        "width": 304,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        1952
      ],
      "typeVersion": 1,
      "id": "de81a6fc-9154-4721-a90a-b0054f4b3430",
      "name": "Sticky Note18"
    },
    {
      "parameters": {
        "model": "embedding-passage"
      },
      "type": "n8n-nodes-upstage.embeddingsUpstageModel",
      "typeVersion": 1,
      "position": [
        128,
        2176
      ],
      "id": "e4a12f13-fe3a-488c-82d6-785e3fa0e2c0",
      "name": "Upstage Embed for Agent5",
      "credentials": {
        "upstageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "\ubbfc\uc6d0\uc5d0 \ub300\ud55c AI \uc0dd\uc131 \ub2f5\ubcc0\uc744 \uac80\uc0c9\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc9c8\ubb38\uc5d0 \ub300\uc751\ub418\ub294 \ub2f5\ubcc0\uc774\ub098 \uc720\uc0ac\ud55c \uc0ac\ub840\ub97c \ucc3e\uc744 \ub54c \ud65c\uc6a9\ud569\ub2c8\ub2e4.",
        "qdrantCollection": {
          "__rl": true,
          "value": "ai_answer",
          "mode": "list",
          "cachedResultName": "ai_answer"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        128,
        2032
      ],
      "id": "740ca4b5-9d4d-4cb8-b01a-25c7eb3f67cd",
      "name": "ai_answer VectorDB",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "return {json:{\n  img_url: null,\n  img_place: null,\n  img_ai: null,\n  img_status: null\n}};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -368,
        1216
      ],
      "id": "882ff5b9-976c-40aa-9b5c-e8d960e42594",
      "name": "Code in JavaScript9"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent": {
      "ai_embedding": [
        [
          {
            "node": "new complaint store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "new complaint store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent3": {
      "ai_embedding": [
        [
          {
            "node": "complaint VectorDB",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent1": {
      "ai_embedding": [
        [
          {
            "node": "answer VectorDB",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent4": {
      "ai_embedding": [
        [
          {
            "node": "agent store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader2": {
      "ai_document": [
        [
          {
            "node": "agent store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Solar Chat for Agent": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent6": {
      "ai_embedding": [
        [
          {
            "node": "ai_answer store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader3": {
      "ai_document": [
        [
          {
            "node": "ai_answer store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter1": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader3",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "answer VectorDB": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "complaint VectorDB": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter2": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader2",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "new complaint store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Upstage Embed for Agent2": {
      "ai_embedding": [
        [
          {
            "node": "ai_summary store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader1": {
      "ai_document": [
        [
          {
            "node": "ai_summary store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter3": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader1",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Points1": {
      "main": [
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "Code in JavaScript4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript4": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Code in JavaScript7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Retrieve Points1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript5": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          },
          {
            "node": "ai_answer store",
            "type": "main",
            "index": 0
          },
          {
            "node": "ai_summary store",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "If4": {
      "main": [
        [
          {
            "node": "AI Agent3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent3": {
      "main": [
        [
          {
            "node": "Edit Fields4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Solar Chat for Agent3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields4": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze an image in Google Gemini2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript6": {
      "main": [
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript7": {
      "main": [
        [
          {
            "node": "agent store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript8": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upstage Embed for Agent5": {
      "ai_embedding": [
        [
          {
            "node": "ai_answer VectorDB",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "ai_answer VectorDB": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript9": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c17dd6ed-2011-43f1-b249-760296339502",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "hiLrM7apLND1wXcg",
  "tags": [
    {
      "updatedAt": "2025-11-16T08:46:16.377Z",
      "createdAt": "2025-11-16T08:46:16.377Z",
      "id": "RrXd8nH1m972IxTm",
      "name": "main"
    }
  ]
}