{
  "name": "🤖 AI powered RAG chatbot for your docs + Google Drive + Gemini + Qdrant",
  "nodes": [
    {
      "id": "7ad5796b-d1a0-4cc1-bed6-105ff499beeb",
      "name": "Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        620,
        720
      ]
    },
    {
      "id": "84986ee2-4d79-49e8-8778-b8a955cf2174",
      "name": "Token Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
      "position": [
        720,
        860
      ]
    },
    {
      "id": "82aa7016-f3af-4de8-a410-b1c802041213",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        540,
        520
      ]
    },
    {
      "id": "07f4d14a-1864-406b-946b-09c776e3038b",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        180,
        -140
      ]
    },
    {
      "id": "b0f9b066-62de-41bc-afce-dcb4d20d100c",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1020,
        840
      ]
    },
    {
      "id": "2a883003-f5ec-409e-97e4-809360ca11ed",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1160,
        -280
      ]
    },
    {
      "id": "cfbb6b77-142f-4689-b051-436f40ababe6",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1120,
        -20
      ]
    },
    {
      "id": "c9c50387-64a3-473f-9ea7-509a301836a3",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        820,
        200
      ]
    },
    {
      "id": "ea143b9f-9bd8-4f3f-8979-5a0fd2691e9d",
      "name": "Extract Meta Data",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1020,
        -180
      ]
    },
    {
      "id": "2ddd778f-6676-4a4b-b592-536401831bc8",
      "name": "Get File Contents",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        820,
        -180
      ]
    },
    {
      "id": "cdbb8bbc-967c-4f01-b844-4d31328153df",
      "name": "Download File From Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        500,
        -180
      ]
    },
    {
      "id": "399e196c-76ec-4077-aacc-f669173b0229",
      "name": "Find File Ids in Google Drive Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -620,
        -160
      ]
    },
    {
      "id": "3bc4f005-c6c8-4f73-816a-1573d6dfb62f",
      "name": "text-embeddings-3-large",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        480,
        720
      ]
    },
    {
      "id": "5d42b34a-7156-4163-a2c4-a9cb3c984c96",
      "name": "Google Folder ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -820,
        -160
      ]
    },
    {
      "id": "7be310c2-d30f-42a2-8f57-33c7b184e429",
      "name": "gpt-4o-mini1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -400,
        940
      ]
    },
    {
      "id": "18aacfd9-3f6e-4fba-9f68-d8cc95bc667b",
      "name": "Delete Qdrant Points by File ID",
      "type": "@n8n/n8n-nodes-langchain.code",
      "position": [
        -500,
        800
      ]
    },
    {
      "id": "329cec97-aac1-4714-97ce-add5915b1078",
      "name": "Qdrant Collection Name",
      "type": "n8n-nodes-base.set",
      "position": [
        -700,
        100
      ]
    },
    {
      "id": "82e98da8-530d-4a3c-97e6-5e91ad644a46",
      "name": "File Id List",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -700,
        280
      ]
    },
    {
      "id": "f3def614-2709-4847-831d-d6a80c86ec1c",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -340,
        340
      ]
    },
    {
      "id": "cfe399fb-8560-4ac4-98f7-4f539ae6a52c",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        -80,
        -140
      ]
    },
    {
      "id": "1059da47-2abd-4884-b9c2-6b7d1623e31d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        560
      ],
      "parameters": {
        "width": 1180,
        "height": 760,
        "content": "## Prepare Qdrant Vector Store"
      }
    },
    {
      "id": "2616e08f-070e-45b5-906f-40e832519aa2",
      "name": "Confirm Qdrant Delete Points",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1060,
        760
      ]
    },
    {
      "id": "9d167192-e87b-41be-87f2-d7ddf866bb8d",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1060,
        1000
      ]
    },
    {
      "id": "1178f8cf-ece0-4b11-942d-18dd025da366",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        420
      ],
      "parameters": {
        "width": 920,
        "height": 640,
        "content": "## Perform Qdrant Vector Store Operations"
      }
    },
    {
      "id": "cbf17a08-2f4c-4605-8418-5bf93ade7cf4",
      "name": "Send Declined Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -740,
        1120
      ]
    },
    {
      "id": "890f478a-e000-418d-8582-4fef946e44d8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -380
      ],
      "parameters": {
        "width": 480,
        "height": 840,
        "content": "## 🌟Workflow Config\n\n- Google Drive Folder Id\n- Qdrant Collection Name\n- List of Google Drive File Id's"
      }
    },
    {
      "id": "d2bc2fed-c134-4e54-bd9d-69996be966a3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -280
      ],
      "parameters": {
        "width": 640,
        "height": 420,
        "content": "## Extract Metadata for Qdrant Hybrid Search"
      }
    },
    {
      "id": "61f3c21e-bc2a-47bc-8ab1-678b1f425ee3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -280
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "## Google Drive"
      }
    },
    {
      "id": "61e608e4-ac6a-4131-9ca8-c46a5134bff9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -360
      ],
      "parameters": {
        "width": 1360,
        "height": 1480,
        "content": "## ✨ Save Documents to Qdrant Vector Store"
      }
    },
    {
      "id": "410681cb-e757-42c0-89de-902edbe998e3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        680
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "## Delete From Qdrant Vector Store\nThis operation can not be undone!!!"
      }
    },
    {
      "id": "238469ce-3710-4681-b1b2-200c1b699d5e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        640
      ],
      "parameters": {
        "width": 380,
        "height": 520,
        "content": "## Human In The Loop\nUser must verify deletion of points from Qdrant vector store"
      }
    },
    {
      "id": "0b2f6ff4-dd02-4f0e-b2eb-60b1ce736cf5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -380
      ],
      "parameters": {
        "width": 340,
        "height": 460,
        "content": "## 👍Start Here!"
      }
    },
    {
      "id": "abde545b-1a23-4b3e-8046-335b9d0fa445",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1160,
        -100
      ]
    },
    {
      "id": "897d29af-719d-4fe7-93a9-44c693cc6547",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -600,
        -1200
      ]
    },
    {
      "id": "316b0d8d-bbc7-4c40-b6d0-d0c762554fca",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -580,
        -1000
      ]
    },
    {
      "id": "f1e342a8-d50e-48a8-9d7a-850f8be93cff",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1160,
        -1200
      ]
    },
    {
      "id": "12902fa9-5bcb-4e8b-ac13-7f4cb6e7e1d0",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -760,
        -1000
      ]
    },
    {
      "id": "1c5818d4-6251-4d14-8b4f-d1f3ddfbed38",
      "name": "text-embeddings-3-large1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -320,
        -840
      ]
    },
    {
      "id": "80056067-5d2b-4ac7-8e69-e75bd66a1ad4",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -1300
      ],
      "parameters": {
        "width": 860,
        "height": 680,
        "content": "## 🤖Retrieve Content from Qdrant Vector Store"
      }
    },
    {
      "id": "b45b18e4-7773-4eec-837b-f43fc0eeb90c",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -1300
      ],
      "parameters": {
        "width": 340,
        "height": 320,
        "content": "## 🗣️ Chat with Your Documents"
      }
    },
    {
      "id": "8fe891dd-dee6-4abb-bc09-d90e6d7bf3cb",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -480
      ],
      "parameters": {
        "width": 2880,
        "height": 1880,
        "content": "# Step 1 - Save Documents to Qdrant Vector Store"
      }
    },
    {
      "id": "4a9bf716-3fc3-4ccc-b831-19a1afdb4588",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -1420
      ],
      "parameters": {
        "width": 1780,
        "height": 880,
        "content": "# Step 2 - Chat with Your Documents from Qdrant Vector Store"
      }
    },
    {
      "id": "fccedfde-c5aa-4237-9d1c-feb9ebabf4f3",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        120,
        -780
      ]
    },
    {
      "id": "6d6813f6-4f2e-499a-9e5c-fe15624a91ef",
      "name": "Respond to User",
      "type": "n8n-nodes-base.set",
      "position": [
        120,
        -960
      ]
    },
    {
      "id": "1c73bae9-2bdd-4383-a6f8-3cf43d3c15be",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -1300
      ],
      "parameters": {
        "width": 340,
        "height": 300,
        "content": "## Save Chat History"
      }
    },
    {
      "id": "db3dcc69-d1d0-48a1-b949-37f2de802b4a",
      "name": "Update Chat History",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        120,
        -1200
      ]
    },
    {
      "id": "2dd28eed-b71b-44fb-bb78-8cb50b0d0c93",
      "name": "Qdrant Vector Store Tool",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        -420,
        -1000
      ]
    },
    {
      "id": "3b130cf8-ab8e-4001-a3d0-a129194aee98",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -760,
        -820
      ]
    },
    {
      "id": "ccc64645-ad14-4b6b-a507-0b5fb0ac945f",
      "name": "Send Completed Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        500,
        200
      ]
    },
    {
      "id": "885fef53-2246-45b1-a122-ab5b82374585",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2120,
        -480
      ],
      "parameters": {
        "width": 700,
        "height": 1240,
        "content": "# 🤖 AI-Powered RAG Chatbot with Google Drive Integration\n\nThis workflow creates a powerful RAG (Retrieval-Augmented Generation) chatbot that can process, store, and interact with documents from Google"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Delete Qdrant Points by File ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Declined Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Confirm Qdrant Delete Points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Google Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Update Chat History",
            "type": "main",
            "index": 0
          },
          {
            "node": "Respond to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "File Id List": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "gpt-4o-mini1": {
      "ai_languageModel": [
        [
          {
            "node": "Delete Qdrant Points by File ID",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Send Completed Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download File From Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to User": {
      "main": [
        []
      ]
    },
    "Google Folder ID": {
      "main": [
        [
          {
            "node": "Find File Ids in Google Drive Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Meta Data": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get File Contents": {
      "main": [
        [
          {
            "node": "Extract Meta Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Qdrant Vector Store": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Chat History": {
      "main": [
        []
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Collection Name": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "text-embeddings-3-large": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Meta Data",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ],
      "ai_vectorStore": [
        []
      ]
    },
    "text-embeddings-3-large1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store Tool",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confirm Qdrant Delete Points": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Qdrant Points by File ID": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Download File From Google Drive": {
      "main": [
        [
          {
            "node": "Get File Contents",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find File Ids in Google Drive Folder": {
      "main": [
        [
          {
            "node": "File Id List",
            "type": "main",
            "index": 0
          },
          {
            "node": "Qdrant Collection Name",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}