{
  "name": "Personal knowledgebase AI agent",
  "nodes": [
    {
      "id": "482f66af-0622-4af8-acee-0e48a07f3f96",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -64,
        192
      ]
    },
    {
      "id": "17ba2dbc-9e23-46ce-bded-ecfe17b5233b",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        48
      ]
    },
    {
      "id": "85da4c7f-ba57-4928-b6ec-0504666799b2",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        672,
        400
      ]
    },
    {
      "id": "f3e1374e-a910-4320-997b-6d45067e3cc7",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        288
      ]
    },
    {
      "id": "63773875-8a87-455b-8919-070126ca879b",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        352,
        288
      ]
    },
    {
      "id": "aaf6e1d7-6834-4c37-bece-e23f37f3299f",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        560,
        288
      ]
    },
    {
      "id": "b470fda2-69f2-49c7-b158-65cb3448941f",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        464,
        160
      ]
    },
    {
      "id": "e3ab773c-ef99-4335-b1e6-c30ae2c6fa0d",
      "name": "Information Extractor1",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        352,
        48
      ]
    },
    {
      "id": "8609fbb2-2fe4-4e25-bb0f-8ba6ad31fb29",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -576,
        -480
      ]
    },
    {
      "id": "1ec9c1f4-6da1-46fd-8cdc-46d847b07c70",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -368,
        -480
      ]
    },
    {
      "id": "f1892eab-e3f3-40aa-a131-a5b5b1efde69",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -368,
        -320
      ]
    },
    {
      "id": "c017c9b2-adc7-43fa-8d1e-1b9d8d377179",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -16,
        -480
      ]
    },
    {
      "id": "964d23b1-d113-4932-a40b-b06549ece0e7",
      "name": "Get row(s) in sheet in Google Sheets",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        -176,
        -320
      ]
    },
    {
      "id": "86e55dcc-5938-402e-b57d-e1fc059007bd",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        736,
        48
      ]
    },
    {
      "id": "c5b9b48e-3866-4c8c-88c1-b4b7eb3e4124",
      "name": "Append row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        928,
        288
      ]
    },
    {
      "id": "99a38def-5b64-4507-94d8-5cf47ccb7ce2",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        288
      ]
    },
    {
      "id": "ab850a10-f51f-4ab7-a498-f8c8ad0f29ba",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -496,
        192
      ]
    },
    {
      "id": "2a200cc4-797d-41af-9b7a-141932ba3adc",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -288,
        192
      ]
    },
    {
      "id": "7d1bcee5-48e5-48d2-8c39-f0e34911d637",
      "name": "Append or update row in sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        944,
        48
      ]
    },
    {
      "id": "a347917e-bacd-418c-861b-ad6149739922",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -576
      ],
      "parameters": {
        "width": 896,
        "height": 432,
        "content": "# Requesting Data"
      }
    },
    {
      "id": "7962782e-1a0b-47d1-b282-f6ff248de89d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -32
      ],
      "parameters": {
        "width": 2080,
        "height": 592,
        "content": "# Storing Data through YouTube Video URL / Article Link"
      }
    },
    {
      "id": "6a44be32-f815-4211-ae78-512c790c7060",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        80
      ],
      "parameters": {
        "width": 1184,
        "height": 480,
        "content": "---\n\n# 🛠 Setup Guide\n\n**Author:** [Rakin Jakaria](https://www.youtube.com/@rakinjakaria)\n\nFollow these steps to get started:\n\n1. **Connect your [Telegram Bot](https://core.telegram.org/bots#botfather)"
      }
    },
    {
      "id": "28025c13-a495-4642-95e7-9553270eae82",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        -672
      ],
      "parameters": {
        "width": 464,
        "height": 208,
        "content": "\n# 1️⃣ Purpose of This Agent\n\nThis workflow lets you:\n\n* **Extract summaries** from YouTube videos or articles.\n* **Store them** in a Google Sheet for later use.\n* **Query stored data** via Telegram.\n"
      }
    },
    {
      "id": "d64e3424-3c87-4847-85a1-adb924c1cde2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        -352
      ],
      "parameters": {
        "width": 544,
        "height": 320,
        "content": "# 2️⃣ How to Use\n\n* Add a **YouTube link** or **article link** to the Google Sheet (**Sheet2**).\n* The workflow will automatically:\n\n  * **Detect** the link type.\n  * Use **Apify** (for YouTube transc"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Information Extractor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Append or update row in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet1": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Append row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor1": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}