{
  "name": "Automated research report generation with AI, Wiki, Search & Gmail/Telegram",
  "nodes": [
    {
      "id": "46c09535-cd6b-481c-b520-67ecb4aad812",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        776,
        -100
      ]
    },
    {
      "id": "574ec863-e557-4196-b1b9-5c275a7de73a",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        896,
        -100
      ]
    },
    {
      "id": "661349c2-7bb1-4c95-af8f-3a108a619c84",
      "name": "Search News",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1016,
        -100
      ]
    },
    {
      "id": "6d43251f-db88-45fa-be65-de368d4db408",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1136,
        -100
      ]
    },
    {
      "id": "c94b1446-82bf-47c8-8f5d-c5da9a43a7e7",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        380,
        -80
      ]
    },
    {
      "id": "834efc04-b05f-4ddc-a8d9-b93d9c4e099a",
      "name": "Query Refiner",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        400,
        -320
      ]
    },
    {
      "id": "1f83e2d8-23ee-46e2-998a-b644ea0fff3c",
      "name": "Research AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        900,
        -320
      ]
    },
    {
      "id": "a53cfaac-425a-4558-a661-1042cb63599d",
      "name": "Google Search Web",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1256,
        -100
      ]
    },
    {
      "id": "27548bf6-7f86-4e38-befb-3ad55c4d6c46",
      "name": "SerpApi",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1376,
        -100
      ]
    },
    {
      "id": "51c1b9be-a3e1-4a93-bb5c-bbde5919de0c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        580,
        -80
      ]
    },
    {
      "id": "2d30f75e-baa0-4dd3-a0f9-cb74d7272d08",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1500,
        -320
      ]
    },
    {
      "id": "b89d5c35-64c4-4e8c-b432-c2219aba8acc",
      "name": "Input Validation",
      "type": "n8n-nodes-base.code",
      "position": [
        180,
        -320
      ]
    },
    {
      "id": "e34f9b0e-a9ca-4011-bfee-c7845c68942b",
      "name": "Parse Research Output",
      "type": "n8n-nodes-base.code",
      "position": [
        1300,
        -320
      ]
    },
    {
      "id": "f4e6e449-1c56-4500-9701-623620360c83",
      "name": "Merge Split Items",
      "type": "n8n-nodes-base.code",
      "position": [
        1700,
        -320
      ]
    },
    {
      "id": "e63a3f5d-dba7-4fc4-afa0-150e63aedbac",
      "name": "Store Research Metadata",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2100,
        -720
      ]
    },
    {
      "id": "2501bc98-a1b4-473b-b4ac-7fd78efcb6be",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1080,
        -1200
      ],
      "parameters": {
        "width": 2900,
        "height": 1600,
        "content": "# 📋 Research Report Workflow 🧠💻\n\nThis workflow generates a professional PDF research report on a given topic, sends it via Telegram, and emails🚀\n\n\n---\n\n## 🔍 **Query Refiner**\n- **What it does**: Refin"
      }
    },
    {
      "id": "b2219fba-c5e5-4c0e-abf2-04a8ef60b795",
      "name": "Generate PDF HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        2120,
        -320
      ]
    },
    {
      "id": "e43bd216-af6a-43a4-9432-c092e34b83ba",
      "name": "Convert HTML to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2300,
        -320
      ]
    },
    {
      "id": "fef45c7d-578b-4202-b804-db4de8a3ab5f",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1900,
        -320
      ]
    },
    {
      "id": "3d942072-ad3f-4d9a-a5f4-48df2d1644b4",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2500,
        -320
      ]
    },
    {
      "id": "5763bd13-f98a-4983-b61d-72efad31f488",
      "name": "Send Research to Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2820,
        0
      ]
    },
    {
      "id": "438acbf5-5609-4c89-8448-c248e5d9bcaf",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -40,
        -220
      ]
    },
    {
      "id": "9545380e-e0aa-405c-9230-eb89354b6775",
      "name": "Send PDF",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2800,
        -340
      ]
    },
    {
      "id": "0c0e336e-12f7-4fa2-b375-c3fcc6630f7e",
      "name": "Executed by Main AI Agent",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -40,
        -420
      ]
    },
    {
      "id": "c12851da-98dd-4785-8dc2-844bedfd5f1e",
      "name": "Search Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2500,
        -720
      ]
    },
    {
      "id": "c8f7d2db-f5b2-4e6d-8c43-2d37e5a9306a",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2700,
        -720
      ]
    }
  ],
  "connections": {
    "SerpApi": {
      "ai_tool": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Store Research Metadata",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate PDF HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Merge Split Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search News": {
      "ai_tool": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Download PDF": {
      "main": [
        [
          {
            "node": "Send Research to Gmail",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query Refiner": {
      "main": [
        [
          {
            "node": "Research AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Folder": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Input Validation": {
      "main": [
        [
          {
            "node": "Query Refiner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF HTML": {
      "main": [
        [
          {
            "node": "Convert HTML to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search Web": {
      "ai_tool": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Merge Split Items": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Research AI Agent": {
      "main": [
        [
          {
            "node": "Parse Research Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Query Refiner",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML to PDF": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          },
          {
            "node": "Search Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Research Output": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Research to Gmail": {
      "main": [
        []
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Query Refiner",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Executed by Main AI Agent": {
      "main": [
        []
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Input Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}