{
  "id": "Z2gPco3VOzFzbWXS",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Generate and score business ideas from Reddit posts using AI",
  "tags": [],
  "nodes": [
    {
      "id": "b85af272-2c25-4e13-a217-39c07e1d9262",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1808,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a4cd15fd-7212-4594-ba2c-df4121fa62a2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cfcc0a4a-69ab-4d32-9e24-29ad70dccdb5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        64
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "88ba2797-c4fa-4b58-9fda-ec79197e6e74",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -336
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8a33a932-0f81-4c71-9bc2-402397ef7cb3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        368
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6065d1fa-cace-4a34-8980-4ac149a7349e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        64
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "aa06779c-87e6-47e7-b8c3-eea40c50a9fa",
      "name": "When Webhook to Reddit Received",
      "type": "n8n-nodes-base.webhook",
      "onError": "continueRegularOutput",
      "position": [
        -1184,
        224
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "aeedb751-14ca-4355-b4c3-2840a3b49ed6",
      "name": "Normalize Input Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -944,
        224
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "fc6eff56-f118-43c6-8c90-1e9594898c23",
      "name": "Fetch Reddit Posts",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -704,
        224
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9737a944-1047-4424-933b-a48f82f2900d",
      "name": "Prepare Reddit Post Items",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        224
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "64ed981b-acb2-41ec-b060-7bd426e50d1c",
      "name": "Loop Over Reddit Posts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -224,
        224
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "4bacf883-0aff-45a2-8b9c-15249523dbf7",
      "name": "Fetch Top Comments from Reddit",
      "type": "n8n-nodes-base.reddit",
      "position": [
        144,
        592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c6f0a97c-9b2d-47fa-bdb2-95566e0accc7",
      "name": "Combine Posts and Comments",
      "type": "n8n-nodes-base.merge",
      "position": [
        384,
        512
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "12d43287-0e89-430b-a45d-147b062dce86",
      "name": "Prepare AI Input Data",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        512
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "d34d2682-f2e4-4bd3-867d-5642d86478af",
      "name": "Generate MVP Ideas",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        160,
        -224
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "65dd7525-fb44-45bc-9870-f5737bcd1d8d",
      "name": "Run Structured Output Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        416,
        144
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d151e59b-02f1-4b31-8abf-9a3931ae4500",
      "name": "Parse Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        368,
        -48
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "1b2e6b76-0e45-448a-8701-15926d3b3591",
      "name": "Merge AI and Reddit Source",
      "type": "n8n-nodes-base.merge",
      "position": [
        624,
        -224
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "7cad5803-eb90-472e-ba71-ed5550717fa0",
      "name": "Normalize and Evaluate Ideas",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        176
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "b4e264cb-7647-403f-94c1-37d83d0bdab7",
      "name": "Construct Webhook Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        176
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "cbdfdd0e-17ac-4e34-ad6d-93bd848878c4",
      "name": "Send Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1488,
        176
      ],
      "parameters": {},
      "typeVersion": 1.5
    },
    {
      "id": "f28ae0bf-3ef2-4f11-956b-7f269213e005",
      "name": "Execute Idea Generator Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        224,
        144
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "timezone": "America/New_York",
    "binaryMode": "separate",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "a7c75dc4-23ed-4e18-8b16-6545b72cabfa",
  "connections": {
    "Fetch Reddit Posts": {
      "main": [
        [
          {
            "node": "Prepare Reddit Post Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate MVP Ideas": {
      "main": [
        [
          {
            "node": "Merge AI and Reddit Source",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Normalize Input Data": {
      "main": [
        [
          {
            "node": "Fetch Reddit Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Input Data": {
      "main": [
        [
          {
            "node": "Loop Over Reddit Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Reddit Posts": {
      "main": [
        [
          {
            "node": "Generate MVP Ideas",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge AI and Reddit Source",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Top Comments from Reddit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Posts and Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Generate MVP Ideas",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Reddit Post Items": {
      "main": [
        [
          {
            "node": "Loop Over Reddit Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Posts and Comments": {
      "main": [
        [
          {
            "node": "Prepare AI Input Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Construct Webhook Response": {
      "main": [
        [
          {
            "node": "Send Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge AI and Reddit Source": {
      "main": [
        [
          {
            "node": "Normalize and Evaluate Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Structured Output Model": {
      "ai_languageModel": [
        [
          {
            "node": "Parse Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Execute Idea Generator Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate MVP Ideas",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Normalize and Evaluate Ideas": {
      "main": [
        [
          {
            "node": "Construct Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Top Comments from Reddit": {
      "main": [
        [
          {
            "node": "Combine Posts and Comments",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When Webhook to Reddit Received": {
      "main": [
        [
          {
            "node": "Normalize Input Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}