{
  "name": "Generate deep research markdown reports with GPT, Tavily Search, and Google Sheets",
  "nodes": [
    {
      "id": "461f5b9e-aae4-440d-ab06-8a1fda2067d2",
      "name": "Plan Topics",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        300,
        360
      ]
    },
    {
      "id": "a6da4abd-c14c-4c83-bd11-669d430f81c6",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        300,
        600
      ]
    },
    {
      "id": "b17c5fa2-2775-46a6-99ac-c33e3cb59be7",
      "name": "5 Topics",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        480,
        600
      ]
    },
    {
      "id": "85f3a5e2-d9cd-4fbc-862c-ad2fa8942c4f",
      "name": "Intro",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        840,
        360
      ]
    },
    {
      "id": "60c9b770-eb5d-4ec4-a1d4-1ce2570858a1",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        820,
        600
      ]
    },
    {
      "id": "dcf99d6f-664e-4bb1-af2f-1cbb36763072",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        840,
        200
      ]
    },
    {
      "id": "836f8995-e123-461f-b505-71e065605684",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1480,
        340
      ]
    },
    {
      "id": "18680074-aad2-4106-9e1c-c7713ce1c32c",
      "name": "Set Topics",
      "type": "n8n-nodes-base.set",
      "position": [
        840,
        20
      ]
    },
    {
      "id": "d7cba83c-f997-4af3-8ffa-900d8875b88a",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1300,
        180
      ]
    },
    {
      "id": "66e44854-4520-48cc-9bab-7b939ee43ae4",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1060,
        20
      ]
    },
    {
      "id": "eed6db9e-16fa-4ac0-b21f-8738a0423517",
      "name": "Get Sources",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2460,
        240
      ]
    },
    {
      "id": "5647860e-f4ec-45ca-bd3a-1f7a55e586f0",
      "name": "OpenRouter Chat Model7",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        3240,
        520
      ]
    },
    {
      "id": "4a5c66ba-d062-4de9-8f81-ba87a84c162e",
      "name": "Sources",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2660,
        240
      ]
    },
    {
      "id": "d3182822-2501-4a79-8638-655bc791ed44",
      "name": "Send Sources",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2980,
        240
      ]
    },
    {
      "id": "db8a1543-2caf-4c55-8289-849b6006cf1a",
      "name": "Get All Content",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3180,
        240
      ]
    },
    {
      "id": "547a265e-2e9e-4442-8ef2-88f2dd4c28c0",
      "name": "Table of Contents",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2220,
        500
      ]
    },
    {
      "id": "7d357654-56ea-48ba-95f4-fd82e36a9c14",
      "name": "Send ToC",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2580,
        500
      ]
    },
    {
      "id": "5477b03c-b667-4c4f-9452-a49ff4602544",
      "name": "Send Intro",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1180,
        360
      ]
    },
    {
      "id": "7a67e38c-e0c9-478a-b522-f7b3aa960b1f",
      "name": "Title, Intro, Chapters",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1040,
        600
      ]
    },
    {
      "id": "5d496c36-6e2a-4413-8e91-b6a32f05bcce",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -120
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "e481fc15-4bdf-4b50-8f9a-ad0510848884",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1940,
        -120
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cc17a444-2cc2-47e5-96ac-d95c83db00f9",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        80,
        360
      ]
    },
    {
      "id": "58f892de-f9b0-44bd-b5d8-9807fd49f3b6",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        60,
        1280
      ]
    },
    {
      "id": "0d335eb8-8be3-4f85-ad17-0b0d0599f29d",
      "name": "OpenRouter Chat Model8",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        920,
        1560
      ]
    },
    {
      "id": "ccd0951b-80a3-44dd-bc21-45fa20ad077e",
      "name": "Tavily5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        1300
      ]
    },
    {
      "id": "f30bc7f6-ce08-44ed-a782-d630b81b3d02",
      "name": "Split Out7",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        700,
        1300
      ]
    },
    {
      "id": "420f21be-5b2c-4a33-912c-106459b8837e",
      "name": "Code5",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        1300
      ]
    },
    {
      "id": "9e20afd7-1dd1-43ec-8e47-6885c738aa15",
      "name": "Aggregate10",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1420,
        1440
      ]
    },
    {
      "id": "ed34ddd8-0fbe-43ab-bb2d-d7f386eb29e7",
      "name": "Writer5",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1060,
        1440
      ]
    },
    {
      "id": "79ed8d33-211f-40b3-b10a-70d936426df5",
      "name": "Aggregate11",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1420,
        1300
      ]
    },
    {
      "id": "713cefcf-2a8b-404e-abc8-e2876b78c74f",
      "name": "Merge8",
      "type": "n8n-nodes-base.merge",
      "position": [
        1760,
        1580
      ]
    },
    {
      "id": "d2787e68-d02c-43da-8e80-d115020779fb",
      "name": "Aggregate12",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        500,
        1020
      ]
    },
    {
      "id": "f7f57f46-44c8-4783-85cd-df842d58544b",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        700,
        1020
      ]
    },
    {
      "id": "26f9b7cb-802e-4ee2-ac49-a7789b0081dd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        900
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7f707137-6524-4e17-86a3-71fb5b1449e5",
      "name": "Get Sections",
      "type": "n8n-nodes-base.code",
      "position": [
        1560,
        1580
      ]
    },
    {
      "id": "0819b92f-9dcb-434f-aaa9-adc74608442d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -120
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Code5": {
      "main": [
        [
          {
            "node": "Writer5",
            "type": "main",
            "index": 0
          },
          {
            "node": "Aggregate11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Intro": {
      "main": [
        [
          {
            "node": "Send Intro",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge8": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sources": {
      "main": [
        [
          {
            "node": "Send Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily5": {
      "main": [
        [
          {
            "node": "Split Out7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Writer5": {
      "main": [
        [
          {
            "node": "Aggregate10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5 Topics": {
      "ai_outputParser": [
        [
          {
            "node": "Plan Topics",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Send ToC": {
      "main": [
        []
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send Intro": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Set Topics": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out7": {
      "main": [
        [
          {
            "node": "Code5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate10": {
      "main": [
        [
          {
            "node": "Get Sections",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge8",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate11": {
      "main": [
        [
          {
            "node": "Merge8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate12": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Sources": {
      "main": [
        [
          {
            "node": "Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Plan Topics": {
      "main": [
        [
          {
            "node": "Intro",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Sections": {
      "main": [
        [
          {
            "node": "Merge8",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Send Sources": {
      "main": [
        [
          {
            "node": "Get All Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Get Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Content": {
      "main": [
        [
          {
            "node": "Table of Contents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Aggregate12",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Tavily5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Table of Contents": {
      "main": [
        [
          {
            "node": "Send ToC",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Plan Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Plan Topics",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Intro",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model7": {
      "ai_languageModel": [
        [
          {
            "node": "Sources",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Table of Contents",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model8": {
      "ai_languageModel": [
        [
          {
            "node": "Writer5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Title, Intro, Chapters": {
      "ai_outputParser": [
        [
          {
            "node": "Intro",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}