{
  "name": "Research AI agent team with auto citations using OpenRouter and Perplexity",
  "nodes": [
    {
      "id": "05f11d31-54c4-40c2-a676-f6b42ec3e15f",
      "name": "Merge chapters title and text",
      "type": "n8n-nodes-base.merge",
      "position": [
        2980,
        360
      ]
    },
    {
      "id": "abf1e9ed-63ad-4ce9-ba54-3160fa6818e7",
      "name": "Final article text",
      "type": "n8n-nodes-base.code",
      "position": [
        3240,
        360
      ]
    },
    {
      "id": "cc499a44-49e6-4e00-9c66-f23f1ec14a6c",
      "name": "n8n Form Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        1140,
        360
      ]
    },
    {
      "id": "632bce8c-d2fa-4b82-b9cb-66d5e48dc413",
      "name": "Ghost",
      "type": "n8n-nodes-base.ghost",
      "position": [
        4260,
        360
      ]
    },
    {
      "id": "d9c41838-d032-4a06-84d9-c967f367314a",
      "name": "Create title",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3940,
        360
      ]
    },
    {
      "id": "e630361f-ddb6-46cd-92c7-810f35972812",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1304.342390271599,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8c9c2c0d-2902-4ee2-8f75-738be085266e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "de03919c-4284-4f3e-8938-d438f6db5be0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9ebd7a08-dd8e-420d-a528-20d1ad88dfce",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "169b775d-c651-4324-a869-22e2d72bf21e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3900,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2038e19e-5ba8-48dd-bdfe-1a1bd6b3fd09",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        1920,
        800
      ]
    },
    {
      "id": "01456bf8-26ec-46c2-8ee8-828782decb47",
      "name": "Response",
      "type": "n8n-nodes-base.set",
      "position": [
        2380,
        800
      ]
    },
    {
      "id": "eb21f1a3-a051-48d4-8c53-f34e21ac787f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        740
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "38a43da1-6c3f-415e-8df6-c3818a10c87f",
      "name": "Perplexity_tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1580,
        540
      ]
    },
    {
      "id": "415689c4-b56d-4b13-b33c-054ddeed9fb3",
      "name": "Perplexity_tool1",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        2740,
        580
      ]
    },
    {
      "id": "6c93e6de-cb4b-4007-a995-c392ae5e0909",
      "name": "Perplexity API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        800
      ]
    },
    {
      "id": "af97eb1a-b84c-49c1-b744-e821ce957806",
      "name": "Research Leader 🔬",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1400,
        360
      ]
    },
    {
      "id": "5b04203e-57b6-4350-b7f4-855377287626",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2040,
        560
      ]
    },
    {
      "id": "5eb16ce3-f398-4af8-824b-51cdfa02852b",
      "name": "Delegate to Research Assistants",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2240,
        360
      ]
    },
    {
      "id": "bdc3be87-b871-4f2c-b40b-a332c08858e4",
      "name": "Research Assistant",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        360
      ]
    },
    {
      "id": "c1666f60-3ec6-4afb-98f4-fb863faf6e9c",
      "name": "Project Planner",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1860,
        360
      ]
    },
    {
      "id": "deb99784-4dd2-4ff0-8d1c-7c570db9cb28",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1860,
        560
      ]
    },
    {
      "id": "c7669cd1-fe60-49a5-93ba-c6cf5878034b",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3700,
        560
      ]
    },
    {
      "id": "cc7b23df-1501-4e33-b06e-a4fdf5be881d",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1420,
        540
      ]
    },
    {
      "id": "00752b7d-9b4c-4b1d-b720-d9b784a3fb2e",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2560,
        560
      ]
    },
    {
      "id": "32b48ae9-ae0f-4f6a-b303-446cf51d7548",
      "name": "Editor",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3460,
        360
      ]
    },
    {
      "id": "f718980e-db45-447c-8c4f-a40fa3073250",
      "name": "Perplexity_tool2",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        2220,
        560
      ]
    },
    {
      "id": "e5e26313-9efc-41b2-8b9a-da12418955a3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        200
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Editor": {
      "main": [
        [
          {
            "node": "Create title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create title": {
      "main": [
        [
          {
            "node": "Ghost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity API": {
      "main": [
        [
          {
            "node": "Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity_tool": {
      "ai_tool": [
        [
          {
            "node": "Research Leader 🔬",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Project Planner": {
      "main": [
        [
          {
            "node": "Delegate to Research Assistants",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity_tool1": {
      "ai_tool": [
        [
          {
            "node": "Research Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity_tool2": {
      "ai_tool": [
        [
          {
            "node": "Project Planner",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "n8n Form Trigger": {
      "main": [
        [
          {
            "node": "Research Leader 🔬",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Project Planner",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Final article text": {
      "main": [
        [
          {
            "node": "Editor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Editor",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Create title",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Research Leader 🔬",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Research Assistant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Research Assistant": {
      "main": [
        [
          {
            "node": "Merge chapters title and text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Leader 🔬": {
      "main": [
        [
          {
            "node": "Project Planner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Perplexity API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Project Planner",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Merge chapters title and text": {
      "main": [
        [
          {
            "node": "Final article text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delegate to Research Assistants": {
      "main": [
        [
          {
            "node": "Merge chapters title and text",
            "type": "main",
            "index": 1
          },
          {
            "node": "Research Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}