{
  "nodes": [
    {
      "id": "5961a808-a873-497e-bc42-5b760ded1571",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        380,
        360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7fa03eaa-7865-46ce-9f58-7e19fc0ec89b",
      "name": "Hacker News",
      "type": "n8n-nodes-base.hackerNews",
      "position": [
        1200,
        400
      ],
      "parameters": {
        "articleId": "={{ $('Set Variables').item.json.story_id }}",
        "additionalFields": {
          "includeComments": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "82675738-9df7-47a3-8363-264bb09255f4",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1560,
        400
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "6800be57-40da-4d80-ac35-304403423263",
      "name": "Get Comments",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "91110cf7-1932-43ca-b24e-9d4ed40447e6",
              "name": "data",
              "type": "array",
              "value": "={{\n$json.children.flatMap(item => {\n  return [\n    { id: item.id, story_id: item.story_id, story_title: $json.title, author: item.author, text: item.text },\n    ...item.children.flatMap(item1 => {\n         return [\n           { id: item1.id, story_id: item1.story_id, story_title: $json.title, author: item1.author, text: item1.text },\n           ...item1.children.flatMap(item2 => {\n               return [\n                 { id: item2.id, story_id: item2.story_id, story_title: $json.title, author: item2.author, text: item2.text },\n                 ...item2.children.flatMap(item3 => {\n                     return [\n                       { id: item3.id, story_id: item3.story_id, story_title: $json.title, author: item3.author, text: item3.text },\n                       ...item3.children.flatMap(item4 => {\n                          return { id: item4.id, story_id: item4.story_id, story_title: $json.title, author: item4.author, text: item4.text }\n                       })\n                     ]\n                 })\n               ]\n           })\n        ]\n    })\n  ]\n})\n}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "18e1b980-1d98-4a89-8cc6-f4793c004d9f",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1960,
        320
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "hn_comments",
          "cachedResultName": "hn_comments"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c4ce1342-1460-4650-8338-055979339f46",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1960,
        480
      ],
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "00301fd6-8766-40f7-99eb-7f8af9a51b29",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2080,
        480
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "item_id",
                "value": "={{ $json.id }}"
              },
              {
                "name": "item_author",
                "value": "={{ $json.author }}"
              },
              {
                "name": "story_id",
                "value": "={{ $json.story_id }}"
              },
              {
                "name": "story_title",
                "value": "={{ $json.story_title }}"
              }
            ]
          }
        },
        "jsonData": "={{ $json.text }}",
        "jsonMode": "expressionData"
      },
      "typeVersion": 1
    },
    {
      "id": "c76d3aea-0906-4ed4-a828-47ad5775364c",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        2080,
        620
      ],
      "parameters": {
        "options": {},
        "chunkSize": 4000
      },
      "typeVersion": 1
    },
    {
      "id": "50735ca9-90eb-408a-9bca-97eea1a310d1",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        620,
        360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5b77516d-acb5-41af-9346-a67acecd0419",
              "name": "story_id",
              "type": "string",
              "value": "41123155"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "376a1a66-1d22-4969-af11-d1a9d474b67b",
      "name": "Clear Existing Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        360
      ],
      "parameters": {
        "url": "http://qdrant:6333/collections/hn_comments/points/delete",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"filter\": {\n        \"must\": [\n            {\n                \"key\": \"metadata.story_id\",\n                \"match\": {\n                    \"value\": \"{{ $('Set Variables').item.json.story_id }}\"\n                }\n            }\n        ]\n    }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "qdrantApi"
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e8bcf7d8-aa25-499e-a64f-4d20caf1d6d4",
      "name": "Get Payload of Points",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1822,
        1100
      ],
      "parameters": {
        "url": "=http://qdrant:6333/collections/hn_comments/points",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n  {\n    \"ids\": $json.points,\n    \"with_payload\": true\n  }\n}}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "qdrantApi"
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "57cbc8e5-dd89-4c2a-9906-2bd0c2bbdede",
      "name": "Clusters To List",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1602,
        1100
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "20b76291-f8fa-4aa7-8f1a-ff423ac3cb7f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2242,
        1320
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "07fc19b3-33b4-42be-bda9-f1436d4e9e6f",
      "name": "Only Clusters With 3+ points",
      "type": "n8n-nodes-base.filter",
      "position": [
        1602,
        1260
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "328f806c-0792-4d90-9bee-a1e10049e78f",
              "operator": {
                "type": "array",
                "operation": "lengthGt",
                "rightType": "number"
              },
              "leftValue": "={{ $json.points }}",
              "rightValue": 2
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "80583492-c454-4b9d-8df9-ded7d50930f2",
      "name": "Set Variables1",
      "type": "n8n-nodes-base.set",
      "position": [
        582,
        1200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2e58a9fa-a14d-4a6c-8cc8-8ec947c791fb",
              "name": "story_id",
              "type": "string",
              "value": "={{ $json.story_id || 41123155 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2cfb3a7a-01d2-4eee-b9f8-d19e81829882",
      "name": "Prep Output For Export",
      "type": "n8n-nodes-base.set",
      "position": [
        2842,
        1200
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={{ {\n  ...$json.output,\n  \"Story ID\": $('Set Variables1').item.json.story_id,\n  \"Story Title\": $('Get Payload of Points').item.json.result[0].payload.metadata.story_title,\n  \"Number of Responses\": $('Get Payload of Points').item.json.result.length,\n  \"Raw Responses\": $('Get Payload of Points').item.json.result.map(item =>\n    [\n      item.payload.metadata.item_id,\n      item.payload.metadata.story_id,\n      item.payload.metadata.story_title,\n      item.payload.metadata.item_author,\n      item.payload.content.replaceAll('\"', '\\\"').replaceAll('\\n', ' ').substring(0, 500)\n    ]\n   ).join('\\n')\n} }}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "ade302fd-93ad-4d96-9852-e4108ba435af",
      "name": "Export To Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3062,
        1200
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Story ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Story ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Insight",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Insight",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sentiment",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Number of Responses",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Number of Responses",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Raw Responses",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Raw Responses",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": []
        },
        "options": {
          "useAppend": true
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=1CPA_SNpWr2OjZ2KMi49fZ6MA9yC9uik8PMOILan7qYE"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "22d54081-7a52-40f2-837c-0c8df05e1fe4",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        382,
        1200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b1e6eb2b-4627-4c69-a2ce-6bb8451d6359",
      "name": "Trigger Insights",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2780,
        360
      ],
      "parameters": {
        "options": {},
        "workflowId": "={{ $workflow.id }}"
      },
      "typeVersion": 1
    },
    {
      "id": "f25e8b2a-5ce4-4e02-8e08-e3dd98072d0e",
      "name": "Prep Values For Trigger",
      "type": "n8n-nodes-base.set",
      "position": [
        2580,
        360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "24dd90ad-390f-444e-ba6c-8c06a41e836e",
              "name": "story_id",
              "type": "string",
              "value": "={{ $('Set Variables').item.json.story_id }}"
            }
          ]
        }
      },
      "executeOnce": true,
      "typeVersion": 3.4
    },
    {
      "id": "d0270fa8-5ebc-4573-b070-05d19dd3302a",
      "name": "Find Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        982,
        1160
      ],
      "parameters": {
        "url": "=http://qdrant:6333/collections/hn_comments/points/scroll",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"limit\": 500,\n  \"filter\":{\n    \"must\": [\n      {\n        \"key\": \"metadata.story_id\",\n        \"match\": { \"value\": {{ $('Set Variables1').item.json.story_id }} }\n      }\n    ]\n  },\n  \"with_vector\":true\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "qdrantApi"
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ca3c040e-bfe1-4f4d-9c4e-154c2010f89b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2440,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 595.5213902293318,
        "height": 429.11782776909047,
        "content": "## 4\ub2e8\uacc4. \ud1b5\ucc30\ub825 \uc11c\ube0c\uc6cc\ud06c\ud50c\ub85c\uc6b0 \ud2b8\ub9ac\uac70  \n[\uc6cc\ud06c\ud50c\ub85c\uc6b0 \ud2b8\ub9ac\uac70\uc5d0 \ub300\ud574 \ub354 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow)  \n\n\uc11c\ube0c\uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 \uc124\ubb38\uc870\uc0ac\uc758 \ubd84\uc11d\uc744 \ud2b8\ub9ac\uac70\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc774 \ubd84\ub9ac\ub294 \uc120\ud0dd\uc0ac\ud56d\uc774\uc9c0\ub9cc, \uc5ec\uae30\uc11c \ub450 \ubd80\ubd84 \ud504\ub85c\uc138\uc2a4\ub97c \ub354 \uc798 \uc2dc\uc5f0\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub429\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "cdf04343-abfa-4705-9828-e246c96ffa2a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1780,
        60
      ],
      "parameters": {
        "color": 7,
        "width": 638.5221986278162,
        "height": 741.0186923170972,
        "content": "## 3\ub2e8\uacc4. \ub313\uae00\uc744 Qdrant\uc5d0 \uc800\uc7a5\n\n[Qdrant Vector Store\uc5d0 \ub300\ud574 \ub354 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant/)\n\n\ubca1\ud130 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub294 \ub370\uc774\ud130 \uc800\uc7a5\uc5d0 \ud6cc\ub96d\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4. \uc720\uc0ac\uc131 \uac80\uc0c9\uc5d0 \uad00\uc2ec\uc774 \uc788\uc73c\uc2dc\uba74, \uc5ec\uae30\uc5d0\uc11c\ub3c4 \uc801\uc6a9\ub429\ub2c8\ub2e4. \uc65c\ub0d0\ud558\uba74 \uc6b0\ub9ac\ub294 \ube44\uc2b7\ud55c \ub313\uae00\uc744 \uadf8\ub8f9\ud654\ud558\uc5ec \ud328\ud134\uc744 \ucc3e\uace0 \uc2f6\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. Qdrant\ub294 \uac15\ub825\ud55c \ubca1\ud130 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc774\uba70, \uac15\ub825\ud55c API \uad6c\ud604\uacfc \uace0\uae09 \ud544\ud130\ub9c1 \uae30\ub2a5 \ub54c\ubb38\uc5d0 \uc120\ud0dd\ub41c \ub3c4\uad6c\uc785\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "14f6872b-1c51-4359-a39f-cc6ba2ff29fb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        200
      ],
      "parameters": {
        "color": 7,
        "width": 656.0317138444963,
        "height": 441.0753369736108,
        "content": "## 2\ub2e8\uacc4. HN API\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub313\uae00 \uac00\uc838\uc624\uae30\n\n[HTTP Request Node\uc5d0 \ub300\ud574 \ub354 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.hackernews)\n\nHN API \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec HN \uc2a4\ud1a0\ub9ac\uc758 \ubaa8\ub4e0 \ub313\uae00\uc744 \uc2a4\ud06c\ub798\ud551\ud569\ub2c8\ub2e4. \ucd94\uac00 \ub2e8\uacc4\ub85c \ub313\uae00 \ud2b8\ub9ac\ub97c \ud3c9\ud0c4\ud654\ud558\uc5ec \ub2f5\uae00\ub3c4 \ucd5c\uc0c1\uc704 \ub313\uae00\ub85c \uac04\uc8fc\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "62935316-310a-4ce9-ac5f-8820666e2290",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        180
      ],
      "parameters": {
        "color": 7,
        "width": 787.3314861380661,
        "height": 465.52420584035275,
        "content": "## 1\ub2e8\uacc4. \uc0c8\ub85c \uc2dc\uc791\ud558\uae30  \n\uc774 \ub370\ubaa8\ub97c \uc704\ud574, \uc120\ud0dd\ub41c HN \uc2a4\ud1a0\ub9ac\uc5d0 \ub300\ud55c Qdrant \ubca1\ud130 \uc800\uc7a5\uc18c\uc5d0 \uc788\ub294 \uae30\uc874 \ub808\ucf54\ub4dc\ub97c \ubaa8\ub450 \uc9c0\uc6b8 \uac83\uc785\ub2c8\ub2e4. \uc774\ub97c Qdrant\uc758 delete points API\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc218\ud589\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "a5e93a02-555c-48a3-afae-344a4884908b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        269,
        1005
      ],
      "parameters": {
        "color": 7,
        "width": 551.2710561574413,
        "height": 407.9295477646979,
        "content": "## 5\ub2e8\uacc4. Insight \ud558\uc704\uc6cc\ud06c\ud50c\ub85c\n\n[\uc6cc\ud06c\ud50c\ub85c\uc6b0 \ud2b8\ub9ac\uac70\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflowtrigger)\n\n\uc774 \ud558\uc704\uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 \uc2a4\ud1a0\ub9ac ID\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6b0\ub9ac Qdrant \ubca1\ud130 \uc2a4\ud1a0\uc5b4\uc5d0\uc11c \uad00\ub828 \ub313\uae00 \ub808\ucf54\ub4dc\ub97c \ucc3e\uc2b5\ub2c8\ub2e4. \uc6b0\ub9ac\uc758 \ubaa9\ud45c\ub294 \ud2b9\uc815 HN \uc2a4\ud1a0\ub9ac\uc5d0 \ub300\ud55c \ucee4\ubba4\ub2c8\ud2f0\uc758 \ud569\uc758\ub97c \ud30c\uc545\ud558\ub294 \ud1b5\ucc30\uc744 \ucc3e\ub294 \uac83\uc785\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "37217a2d-aca4-499b-9d6b-a1d4c6684194",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        920
      ],
      "parameters": {
        "color": 7,
        "width": 600.1809497875241,
        "height": 482.99934349707576,
        "content": "## 6\ub2e8\uacc4. \ub313\uae00\uc5d0 \ud074\ub7ec\uc2a4\ud130\ub9c1 \uc54c\uace0\ub9ac\uc998 \uc801\uc6a9  \n[ n8n\uc5d0\uc11c Python \uc0ac\uc6a9\uc5d0 \ub300\ud574 \ub354 \uc54c\uc544\ubcf4\uae30 ](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code)  \n\n\uc6b0\ub9ac\ub294 \uc6d0\ud558\ub294 HN \uc2a4\ud1a0\ub9ac \ub313\uae00\uc5d0 \ub300\ud55c \ubca1\ud130 \uc784\ubca0\ub529\uc744 \uac00\uc838\uc640\uc11c \uace0\uae09 \ud074\ub7ec\uc2a4\ud130\ub9c1 \uc54c\uace0\ub9ac\uc998\uc744 \uc218\ud589\ud560 \uac83\uc785\ub2c8\ub2e4. \uc774 \uac15\ub825\ud55c \uae30\uc220\uc740 \uc720\uc0ac\ud55c \uc784\ubca0\ub529\uc744 \ud074\ub7ec\uc2a4\ud130\ub85c \ube60\ub974\uac8c \uadf8\ub8f9\ud654\ud558\uc5ec \uc778\uae30 \ud53c\ub4dc\ubc31, \uc758\uacac \ubc0f \ubb38\uc81c\uc810\uc744 \ubc1c\uacac\ud558\ub294 \ub370 \uc0ac\uc6a9\ud560 \uc218 \uc788\uac8c \ud574\uc90d\ub2c8\ub2e4!  \n\n\uc6b0\ub9ac\ub294 Python Code Node \ub355\ubd84\uc5d0 \uc774\ub97c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "fcccc9a8-ee9f-41b7-b7d6-e8fbbe19dfa3",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1466,
        880
      ],
      "parameters": {
        "color": 7,
        "width": 598.5585287222906,
        "height": 605.9905193915599,
        "content": "## 7\ub2e8\uacc4. \ud074\ub7ec\uc2a4\ud130\ubcc4 \ub313\uae00 \ub0b4\uc6a9 \uac00\uc838\uc624\uae30  \n[\ucf54\ub4dc \ub178\ub4dc \uc0ac\uc6a9\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)  \n\n\uc6b0\ub9ac\uc758 \ucf54\ub4dc \ub178\ub4dc\uc5d0 \uc758\ud574 \uadf8\ub8f9\ud654\ub418\uace0 \ubc18\ud658\ub41c Qdrant \ud3ec\uc778\ud2b8 ID\uc640 \ud568\uaed8, \uac01 \ud56d\ubaa9\uc758 \ud398\uc774\ub85c\ub4dc\ub97c \uac00\uc838\uc624\ub294 \uc77c\ub9cc \ub0a8\uc558\uc2b5\ub2c8\ub2e4. \ud074\ub7ec\uc2a4\ud130\ub9c1 \uc54c\uace0\ub9ac\uc998\uc774 \uc644\ubcbd\ud558\uc9c0 \uc54a\ub2e4\ub294 \uc810\uc5d0 \uc720\uc758\ud558\uc138\uc694. \ub370\uc774\ud130\uc5d0 \ub530\ub77c \uc870\uc815\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "78e9cd03-dea4-4b11-947f-a00d7bb5f8cf",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2086,
        929
      ],
      "parameters": {
        "color": 7,
        "width": 587.6069484146701,
        "height": 583.305275883189,
        "content": "## 8\ub2e8\uacc4. \uadf8\ub8f9\ud654\ub41c \ub313\uae00\uc5d0\uc11c \ud1b5\ucc30 \uc5bb\uae30\n\n[\uc815\ubcf4 \ucd94\ucd9c\uae30 \ub178\ub4dc \uc0ac\uc6a9\uc5d0 \ub300\ud574 \ub354 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor)\n\n\ub2e4\uc74c\uc73c\ub85c, \uc6b0\ub9ac\ub294 \ucd5c\ucca8\ub2e8 LLM\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub313\uae00 \uadf8\ub8f9\uc5d0 \ub300\ud55c \ud1b5\ucc30\uc744 \uc0dd\uc131\ud560 \uac83\uc785\ub2c8\ub2e4. \uc774\ub807\uac8c \ud558\uba74, \uc6b0\ub9ac\ub294 HN \uc2a4\ud1a0\ub9ac\uc5d0\uc11c \ub17c\uc758\ub41c \ub9ce\uc740 \uc8fc\uc694 \uc8fc\uc81c\ub97c \ub2e4\ub8e8\ub294 \ub354 \uc138\ubd80\uc801\uc778 \uacb0\uacfc\ub97c \ub04c\uc5b4\ub0bc \uc218 \uc788\uc744 \uac83\uc785\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "d5427741-6015-4af5-8e45-f6fc6f5c4133",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2706,
        940
      ],
      "parameters": {
        "color": 7,
        "width": 572.5638733479158,
        "height": 464.4019616956416,
        "content": "## 9\ub2e8\uacc4. Insights Sheet\uc5d0 \uc791\uc131\n\n\ub9c8\uc9c0\ub9c9\uc73c\ub85c, \uc6b0\ub9ac \uc644\ub8cc\ub41c \uc778\uc0ac\uc774\ud2b8\uac00 \uc6cc\ud06c\ud50c\ub85c\uc5d0\uc11c \uc774\uc804\uc5d0 \ub9cc\ub4e0 Insights Sheet\uc5d0 \ucd94\uac00\ub429\ub2c8\ub2e4.\n\n\uc0d8\ud50c \uc2dc\ud2b8\ub97c \uc5ec\uae30\uc5d0\uc11c \ucc3e\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4: https://docs.google.com/spreadsheets/d/e/2PACX-1vQXaQU9XxsxnUIIeqmmf1PuYRuYtwviVXTv6Mz9Vo6_a4ty-XaJHSeZsptjWXS3wGGDG8Z4u16rvE7l/pubhtml"
      },
      "typeVersion": 1
    },
    {
      "id": "a66b7e6d-0602-4f6b-a9f6-76a63d590956",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        313.32160655630304
      ],
      "parameters": {
        "width": 226.36363118160727,
        "height": 296.5755172289686,
        "content": "### \ud83d\udea8 \uc5ec\uae30\uc5d0 \uc2a4\ud1a0\ub9ac ID\ub97c \uc124\uc815\ud558\uc138\uc694! \uc720\ud6a8\ud55c HN \uc2a4\ud1a0\ub9ac ID\uc5ec\uc57c \ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "42f93189-4bd8-4487-975a-f1c8f8365242",
      "name": "Apply K-means Clustering Algorithm",
      "type": "n8n-nodes-base.code",
      "position": [
        1202,
        1160
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "import numpy as np\nfrom sklearn.cluster import KMeans\n\n# get vectors for all answers\npoint_ids = [item.id for item in _input.first().json.result.points]\nvectors = [item.vector.to_py() for item in _input.first().json.result.points]\nvectors_array = np.array(vectors)\n\n# apply k-means clustering where n_clusters = 5\n# this is a max and we'll discard some of these clusters later\nkmeans = KMeans(n_clusters=min(len(vectors), 5), random_state=42).fit(vectors_array)\nlabels = kmeans.labels_\nunique_labels = set(labels)\n\n# Extract and print points in each cluster\nclusters = {}\nfor label in set(labels):\n    clusters[label] = vectors_array[labels == label]\n\n# return Qdrant point ids for each cluster\n# we'll use these ids to fetch the payloads from the vector store.\noutput = []\nfor cluster_id, cluster_points in clusters.items():\n    points = [point_ids[i] for i in range(len(labels)) if labels[i] == cluster_id]\n    output.append({\n        \"id\": f\"Cluster {cluster_id}\",\n        \"total\": len(cluster_points),\n        \"points\": points\n    })\n\nreturn {\"json\": {\"output\": output } }"
      },
      "typeVersion": 2
    },
    {
      "id": "4ddeab09-e401-41ad-861f-560b9e92bf89",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        40
      ],
      "parameters": {
        "width": 400.381109509268,
        "height": 612.855812336249,
        "content": "## \uc9c1\uc811 \ud574\ubcf4\uc138\uc694!\n\n### \uc774 \uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 HN \uc2a4\ud1a0\ub9ac \ub313\uae00\uc5d0\uc11c \uace0\ub3c4\ub85c \uc0c1\uc138\ud55c \ucee4\ubba4\ub2c8\ud2f0 \uc778\uc0ac\uc774\ud2b8\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \ub9ce\uc740 \uc218\uc758 \ub313\uae00\uc744 \ub2e4\ub8f0 \ub54c \uac00\uc7a5 \uc798 \uc791\ub3d9\ud569\ub2c8\ub2e4.\n\n* HN \uc2a4\ud1a0\ub9ac \ub313\uae00\uc744 \uac00\uc838\uc640 Qdrant \ubca1\ud130 \uc2a4\ud1a0\uc5b4\uc5d0\uc11c \ubca1\ud130\ud654\ud569\ub2c8\ub2e4.\n* K-means \ud074\ub7ec\uc2a4\ud130\ub9c1 \uc54c\uace0\ub9ac\uc998\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud1a0\ub860\uc5d0\uc11c \uc778\uae30 \uc788\ub294 \uc8fc\uc81c\uc758 \ud074\ub7ec\uc2a4\ud130\ub97c \uc2dd\ubcc4\ud569\ub2c8\ub2e4. \n* \uac01 \uc720\ud6a8\ud55c \ud074\ub7ec\uc2a4\ud130\ub97c LLM\uc73c\ub85c \ubd84\uc11d\ud558\uace0 \uc694\uc57d\ud569\ub2c8\ub2e4.\n* LLM \uc751\ub2f5\uacfc \ud074\ub7ec\uc2a4\ud130 \uacb0\uacfc\ub97c \uc2dc\ud2b8\ub85c \ub2e4\uc2dc \ub0b4\ubcf4\ub0c5\ub2c8\ub2e4.\n\n\uc5ec\uae30\uc5d0\uc11c \ucc38\uc870 Google \uc2dc\ud2b8\ub97c \ud655\uc778\ud558\uc138\uc694: https://docs.google.com/spreadsheets/d/e/2PACX-1vQXaQU9XxsxnUIIeqmmf1PuYRuYtwviVXTv6Mz9Vo6_a4ty-XaJHSeZsptjWXS3wGGDG8Z4u16rvE7l/pubhtml\n\n### \ub3c4\uc6c0\uc774 \ud544\uc694\ud558\uc2e0\uac00\uc694?\n[Discord](https://discord.com/invite/XPKeKXeB7d)\uc5d0 \uac00\uc785\ud558\uac70\ub098 [Forum](https://community.n8n.io/)\uc5d0\uc11c \ubb3c\uc5b4\ubcf4\uc138\uc694!\n\n\uc990\uac81\uac8c \ud574\ud0b9\ud558\uc138\uc694!"
      },
      "typeVersion": 1
    },
    {
      "id": "eea1b301-f030-48a9-bcfc-63fe3e1aac0d",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2260,
        1140
      ],
      "parameters": {
        "text": "=The {{ $json.result.length }} comments were:\n{{\n$json.result.map(item =>\n`* Commenter \"${item.payload.metadata.item_author}\" says the following: \"${item.payload.content.replaceAll('\"', '\\\"').replaceAll('\\n', ' ')}\"`\n).join('\\n')\n}}",
        "options": {
          "systemPromptTemplate": "=You help summarise a selection of forum comments for an article called \"{{ $json.result[0].payload.metadata.story_title }}\".\nThe {{ $json.result.length }} comments were selected because their contents were similar in context.\n\nYour task is to: \n* summarise the given comments into a short paragraph. Provide an insight from this summary and what we could learn from the comments.\n* determine if the overall sentiment of all the listed responses to be either strongly negative, negative, neutral, positive or strongly positive."
        },
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n\t\"Insight\": \"\",\n    \"Sentiment\": \"\",\n    \"Suggested Improvements\": \"\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "bee4dd57-c907-418f-ad87-21c6ce4e6698",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        660
      ],
      "parameters": {
        "color": 5,
        "width": 323.2987132716669,
        "height": 80,
        "content": "\uc774\uac83\uc744 \ud55c \ubc88\ub9cc \uc2e4\ud589\ud558\uc138\uc694!  \n\ub9cc\uc57d \uc5b4\ub5a4 \uc774\uc720\ub85c \uc5ec\ub7ec \ubc88 \uc2e4\ud589\ud574\uc57c \ud55c\ub2e4\uba74, \uae30\uc874 \ub370\uc774\ud130\ub97c \uba3c\uc800 \uc9c0\uc6b0\ub294 \uac83\uc744 \ud655\uc2e4\ud788 \ud558\uc138\uc694."
      },
      "typeVersion": 1
    },
    {
      "id": "429e080d-5a94-442c-a2b0-6a12f03a8a98",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        1440
      ],
      "parameters": {
        "color": 5,
        "width": 323.2987132716669,
        "height": 110.05160146874424,
        "content": "\ucc98\uc74c \uc2e4\ud589 \uc911\uc785\ub2c8\uae4c?  \n\ucc98\uc74c \uc2e4\ud589 \uc2dc \uc57d\uac04\uc758 \uc9c0\uc5f0\uc774 \ubc1c\uc0dd\ud569\ub2c8\ub2e4. \ucf54\ub4dc \ub178\ub4dc\uac00 \ud544\uc694\ud55c \ud328\ud0a4\uc9c0\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud574\uc57c \ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hacker News": {
      "main": [
        [
          {
            "node": "Get Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Comments": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Comments": {
      "main": [
        [
          {
            "node": "Apply K-means Clustering Algorithm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Clear Existing Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables1": {
      "main": [
        [
          {
            "node": "Find Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clusters To List": {
      "main": [
        [
          {
            "node": "Only Clusters With 3+ points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "main": [
        [
          {
            "node": "Prep Values For Trigger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Payload of Points": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Prep Output For Export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Output For Export": {
      "main": [
        [
          {
            "node": "Export To Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear Existing Comments": {
      "main": [
        [
          {
            "node": "Hacker News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Values For Trigger": {
      "main": [
        [
          {
            "node": "Trigger Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Set Variables1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only Clusters With 3+ points": {
      "main": [
        [
          {
            "node": "Get Payload of Points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply K-means Clustering Algorithm": {
      "main": [
        [
          {
            "node": "Clusters To List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}