{
  "name": "Generate Reddit customer leads from a product URL with OpenAI and Firecrawl",
  "nodes": [
    {
      "id": "0c5652da-95ff-4c9e-be66-0ae21e591de7",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1888,
        208
      ]
    },
    {
      "id": "7f67cc7d-1ce8-4115-9758-437cf05c58a9",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1200,
        752
      ]
    },
    {
      "id": "1ee80d75-bad0-41b7-aa82-3584679a0881",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        976,
        720
      ]
    },
    {
      "id": "21fe7ff8-73ef-45fc-86e1-b961f646246c",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1632,
        624
      ]
    },
    {
      "id": "9f3e36f3-5913-406e-b65d-3b728d070fb1",
      "name": "Aggregate3",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1200,
        496
      ]
    },
    {
      "id": "3baea4b6-10f1-4bb9-b905-7f5113187272",
      "name": "Reddit Posts Keywords Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1744,
        -16
      ]
    },
    {
      "id": "83188d1b-1e0b-4678-b5f4-1dcba012d3eb",
      "name": "Posts Relevance AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        848,
        496
      ]
    },
    {
      "id": "b840db51-a24e-4d46-8ada-3361dc560e22",
      "name": "Clean results",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        624
      ]
    },
    {
      "id": "de3c10e5-be6a-46d6-8d26-a2b9eec9ee1d",
      "name": "Search for Posts (Keyword/Phrase)",
      "type": "n8n-nodes-base.reddit",
      "position": [
        400,
        624
      ]
    },
    {
      "id": "3d129cb6-b34b-4710-800e-133e39a77f47",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -80
      ],
      "parameters": {
        "width": 2464,
        "height": 464,
        "content": "## Process Product URL, Send Website Analysis and Keywords to Server/Frontend"
      }
    },
    {
      "id": "74f112b9-2820-4742-be7f-a316ec3b188f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -176,
        -16
      ]
    },
    {
      "id": "38e67c19-4c0d-46da-9cb4-881e07a57931",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        752,
        208
      ]
    },
    {
      "id": "60f7e528-0bfd-437e-bfd0-f04f7f6e26bc",
      "name": "Structured Output Parser4",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        880,
        208
      ]
    },
    {
      "id": "12b084df-808c-44da-9061-21900fc28b33",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1088,
        -16
      ]
    },
    {
      "id": "870b8682-833f-4c15-b9bb-ee6cf0563417",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        848,
        720
      ]
    },
    {
      "id": "6d847db9-9f96-406c-a416-99af6e9674d6",
      "name": "Aggregate5",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3344,
        208
      ]
    },
    {
      "id": "8a5b72e6-9b60-4be1-a206-51f83deceb90",
      "name": "Structured Output Parser5",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3120,
        192
      ]
    },
    {
      "id": "630c4fbf-dfe4-48d7-b608-61434e77d97a",
      "name": "Merge3",
      "type": "n8n-nodes-base.merge",
      "position": [
        3568,
        96
      ]
    },
    {
      "id": "8c46816e-bbe6-4350-835e-912765cf4d14",
      "name": "Aggregate6",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3344,
        -32
      ]
    },
    {
      "id": "3bf798ad-3f52-4231-b4d0-83dbce730428",
      "name": "Posts Relevance AI Agent2",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2992,
        -32
      ]
    },
    {
      "id": "87e4aa6e-6ebb-469a-af38-14c15e4448a5",
      "name": "Clean results2",
      "type": "n8n-nodes-base.code",
      "position": [
        2768,
        96
      ]
    },
    {
      "id": "63915944-b1b3-4069-a358-88fa03aa4159",
      "name": "Search for Posts (Keyword/Phrase)2",
      "type": "n8n-nodes-base.reddit",
      "position": [
        2544,
        96
      ]
    },
    {
      "id": "67b9c808-fadc-49ea-ae23-d044d7dd2972",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2992,
        192
      ]
    },
    {
      "id": "ca78c115-c11e-4340-b2e2-73db050f6087",
      "name": "Aggregate9",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4032,
        768
      ]
    },
    {
      "id": "14c5fa1b-4f89-45a1-ac08-251ef8609574",
      "name": "Structured Output Parser7",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3824,
        768
      ]
    },
    {
      "id": "efbed6ed-334f-4e35-9ca4-5def64c01236",
      "name": "Merge5",
      "type": "n8n-nodes-base.merge",
      "position": [
        4256,
        672
      ]
    },
    {
      "id": "b845e2bd-0353-4c9e-9ac7-977068965443",
      "name": "Aggregate10",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4032,
        624
      ]
    },
    {
      "id": "3abacb05-9436-41fb-9122-53b6698a34e9",
      "name": "Posts Relevance AI Agent4",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3696,
        624
      ]
    },
    {
      "id": "619719b7-a33a-4dea-8132-f90977084fc8",
      "name": "Clean results4",
      "type": "n8n-nodes-base.code",
      "position": [
        3456,
        672
      ]
    },
    {
      "id": "8cac8a56-8a75-4550-b1f2-f9784c55bb27",
      "name": "Search for Posts (Keyword/Phrase)4",
      "type": "n8n-nodes-base.reddit",
      "position": [
        3232,
        672
      ]
    },
    {
      "id": "cb4cd520-d269-4526-afa4-5be42cbd0f73",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2784,
        672
      ]
    },
    {
      "id": "ad9486e0-ff14-4b60-bc19-74e598e03519",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3008,
        672
      ]
    },
    {
      "id": "dbc94d02-7c7c-40d1-a483-e239df618c0c",
      "name": "Aggregate11",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3456,
        464
      ]
    },
    {
      "id": "5ff4dfff-1330-49d4-90a9-5f9fe523826c",
      "name": "OpenAI Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3696,
        768
      ]
    },
    {
      "id": "e0fa1c22-c012-4769-8ef8-f0deaa7f4e31",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        -80
      ],
      "parameters": {
        "width": 1936,
        "height": 464,
        "content": "## Process and send conversations for Keyword #2"
      }
    },
    {
      "id": "ec54a767-e0be-4084-9e5f-dbe06b1df078",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        432
      ],
      "parameters": {
        "width": 2016,
        "height": 496,
        "content": "## Process and send conversations for Keyword #1"
      }
    },
    {
      "id": "492af242-f6c3-4177-a3be-e2508daec61a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        432
      ],
      "parameters": {
        "width": 2336,
        "height": 496,
        "content": "## Process and send conversations for Keyword #3 - #10"
      }
    },
    {
      "id": "4d0a5307-6fd7-481b-a3de-b9fbc84bfee1",
      "name": "Set Environment Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        32,
        -16
      ]
    },
    {
      "id": "23f69bb7-4150-4c19-837b-3c7c5e972bff",
      "name": "Sanitize Results",
      "type": "n8n-nodes-base.code",
      "position": [
        512,
        -16
      ]
    },
    {
      "id": "9d52e481-9595-42ad-b791-dd539d3ae888",
      "name": "Analyze Product URL Scrape",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        736,
        -16
      ]
    },
    {
      "id": "92974151-960e-40b4-a263-bbc10247d947",
      "name": "Sanitize JSON Values",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        -16
      ]
    },
    {
      "id": "b7cad7e8-3579-443d-b06e-de68b5660155",
      "name": "Send keywords to Server",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2096,
        -16
      ]
    },
    {
      "id": "4459343c-6649-4cf0-a9e0-ab18676b775d",
      "name": "Send Website Analysis Data to Server",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        -16
      ]
    },
    {
      "id": "264e6e25-f7f5-408b-bd8f-d77de3f1b409",
      "name": "Send Conversations for keyword #1 to Server",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        624
      ]
    },
    {
      "id": "f5883372-8e1c-47b5-abaf-afa7888c55fa",
      "name": "Send Conversations for Keyword #2 to Server",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4016,
        96
      ]
    },
    {
      "id": "696947ee-4433-41ab-817a-d2aadec0b503",
      "name": "Parse Qualifying Posts",
      "type": "n8n-nodes-base.code",
      "position": [
        1856,
        624
      ]
    },
    {
      "id": "2e457ed2-0fc0-4b13-bf33-06db31a36153",
      "name": "Parse Qualifying Posts 2",
      "type": "n8n-nodes-base.code",
      "position": [
        3792,
        96
      ]
    },
    {
      "id": "e434d3ed-624b-4c29-b7be-0109ce0cce66",
      "name": "Parse Qualifying Posts Final",
      "type": "n8n-nodes-base.code",
      "position": [
        4432,
        672
      ]
    },
    {
      "id": "f5410841-0006-43c8-b531-7d1e2f225aa8",
      "name": "Sanitize & Parse Final Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        3696,
        464
      ]
    },
    {
      "id": "e70987bf-f0a4-4f81-b1ee-fc618f4c20e3",
      "name": "Send Final Conversations For Keyword #3 to #10 to Server",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4032,
        464
      ]
    },
    {
      "id": "ac1f2acf-4c27-4380-b78f-e41421fd7764",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -176
      ],
      "parameters": {
        "width": 4928,
        "height": 1168,
        "content": "## Reddit Leads Finder N8N Automation"
      }
    },
    {
      "id": "80df2ba7-dfb3-4fba-b832-69fef5dd4986",
      "name": "get keyword 3 - 10 For Final Processing",
      "type": "n8n-nodes-base.code",
      "position": [
        2544,
        672
      ]
    },
    {
      "id": "87f27831-c255-4756-b8a8-552d32efda2e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        656
      ],
      "parameters": {
        "width": 560,
        "height": 336,
        "content": "## Resources\n\n1. [Youtube Tutorial]()\n2. [Medium Article Guide]()\n3. [Open Source Github Repo]()\n\n## Contacts for Questions and Work\n\n**Website**: [Leadly Solutions](https://leadlysolutionns.com)\n**Em"
      }
    },
    {
      "id": "b5beb46d-3236-42f4-b4ae-6cc8afca0926",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -176
      ],
      "parameters": {
        "width": 560,
        "height": 800,
        "content": "![](https://res.cloudinary.com/dd6vlwblr/image/upload/v1769022321/0_lgiwxy.png)\n## Basic Setup Guide\n**On Set Environment node** get the secret key from [keygen.leadlysolutions.com](https://keygen.lea"
      }
    },
    {
      "id": "f3075513-91af-467f-bf21-6cff561b69fa",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1728,
        208
      ]
    },
    {
      "id": "0ce25e86-82df-4678-bbaf-525893203a83",
      "name": "Scrape Product URL and get its content",
      "type": "@mendable/n8n-nodes-firecrawl.firecrawl",
      "position": [
        288,
        -16
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Parse Qualifying Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge3": {
      "main": [
        [
          {
            "node": "Parse Qualifying Posts 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge5": {
      "main": [
        [
          {
            "node": "Parse Qualifying Posts Final",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Set Environment Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate5": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate6": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate9": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate10": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate11": {
      "main": [
        [
          {
            "node": "Sanitize & Parse Final Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Sanitize JSON Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean results": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          },
          {
            "node": "Posts Relevance AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean results2": {
      "main": [
        [
          {
            "node": "Aggregate5",
            "type": "main",
            "index": 0
          },
          {
            "node": "Posts Relevance AI Agent2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean results4": {
      "main": [
        [
          {
            "node": "Aggregate9",
            "type": "main",
            "index": 0
          },
          {
            "node": "Posts Relevance AI Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Aggregate11",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search for Posts (Keyword/Phrase)4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize Results": {
      "main": [
        [
          {
            "node": "Analyze Product URL Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Reddit Posts Keywords Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Product URL Scrape",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Posts Relevance AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Posts Relevance AI Agent2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Posts Relevance AI Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize JSON Values": {
      "main": [
        [
          {
            "node": "Send Website Analysis Data to Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Qualifying Posts": {
      "main": [
        [
          {
            "node": "Send Conversations for keyword #1 to Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send keywords to Server": {
      "main": [
        [
          {
            "node": "Search for Posts (Keyword/Phrase)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Qualifying Posts 2": {
      "main": [
        [
          {
            "node": "Send Conversations for Keyword #2 to Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Posts Relevance AI Agent": {
      "main": [
        [
          {
            "node": "Aggregate3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Reddit Posts Keywords Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Posts Relevance AI Agent2": {
      "main": [
        [
          {
            "node": "Aggregate6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Posts Relevance AI Agent4": {
      "main": [
        [
          {
            "node": "Aggregate10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Environment Variables": {
      "main": [
        [
          {
            "node": "Scrape Product URL and get its content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Posts Relevance AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser4": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Product URL Scrape",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser5": {
      "ai_outputParser": [
        [
          {
            "node": "Posts Relevance AI Agent2",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser7": {
      "ai_outputParser": [
        [
          {
            "node": "Posts Relevance AI Agent4",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Product URL Scrape": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Qualifying Posts Final": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize & Parse Final Payload": {
      "main": [
        [
          {
            "node": "Send Final Conversations For Keyword #3 to #10 to Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reddit Posts Keywords Generator": {
      "main": [
        [
          {
            "node": "Send keywords to Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search for Posts (Keyword/Phrase)": {
      "main": [
        [
          {
            "node": "Clean results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search for Posts (Keyword/Phrase)2": {
      "main": [
        [
          {
            "node": "Clean results2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search for Posts (Keyword/Phrase)4": {
      "main": [
        [
          {
            "node": "Clean results4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Website Analysis Data to Server": {
      "main": [
        [
          {
            "node": "Reddit Posts Keywords Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Product URL and get its content": {
      "main": [
        [
          {
            "node": "Sanitize Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get keyword 3 - 10 For Final Processing": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Conversations for Keyword #2 to Server": {
      "main": [
        [
          {
            "node": "get keyword 3 - 10 For Final Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Conversations for keyword #1 to Server": {
      "main": [
        [
          {
            "node": "Search for Posts (Keyword/Phrase)2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}