{
  "name": "Website chatbot with Google Drive knowledge base using GPT-4 and Mistral AI",
  "nodes": [
    {
      "id": "671268e2-e7a4-4b30-90ad-e132f8e8afee",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -368,
        480
      ]
    },
    {
      "id": "fb2d9289-334f-43a1-a305-d40e70e39b97",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        32,
        784
      ]
    },
    {
      "id": "94cb5658-5ec0-47ac-8192-9793189937a8",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        256,
        784
      ]
    },
    {
      "id": "f7408b4e-025e-4a43-9c76-3b157537d43d",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -880,
        1328
      ]
    },
    {
      "id": "c7807b4e-eed0-42c1-a066-74c12215ec57",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        752,
        1552
      ]
    },
    {
      "id": "bab90cc7-5a3c-426d-8c84-c813bf037e76",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1296,
        1584
      ]
    },
    {
      "id": "5349c366-6b07-4838-824e-b0192070de44",
      "name": "Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "position": [
        1376,
        1744
      ]
    },
    {
      "id": "53158770-6435-4615-8c52-9499004d365f",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        640,
        1328
      ]
    },
    {
      "id": "9a5aa2c1-de3b-43b3-941d-eac3a9aa01c2",
      "name": "Qdrant Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1344,
        1312
      ]
    },
    {
      "id": "7994799d-0f57-454f-ae5f-6d0bfc78973a",
      "name": "Embeddings Mistral Cloud",
      "type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
      "position": [
        1136,
        1600
      ]
    },
    {
      "id": "c2595c65-fbff-45db-a179-d6bdbde1ea01",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        544,
        656
      ]
    },
    {
      "id": "e3617329-c6a9-4616-8f57-a571a4170ebe",
      "name": "Embeddings Mistral Cloud1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
      "position": [
        464,
        784
      ]
    },
    {
      "id": "950091b1-c765-42ee-b0e8-d715fcefa8f3",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1264,
        1328
      ]
    },
    {
      "id": "a49b8efb-07bb-43ec-9fed-a5ed5b12a944",
      "name": "Set metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        -656,
        1344
      ]
    },
    {
      "id": "6451f612-f4db-49a7-8f83-436ed9025882",
      "name": "Mistral Upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        1344
      ]
    },
    {
      "id": "26913424-307f-435e-a6ee-ea4d217e11b7",
      "name": "Mistral Signed URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        1344
      ]
    },
    {
      "id": "b4d90372-a7d5-42e2-b9f3-21687fba59eb",
      "name": "Mistral DOC OCR",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        1344
      ]
    },
    {
      "id": "664b3731-0da6-4dfa-b3d5-d05edff8fb70",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        1200
      ],
      "parameters": {
        "width": 688,
        "height": 304,
        "content": "## MISTRAL OCR\n [OCR Guide](https://mistral.ai/news/mistral-ocr)\n1. UPLOAD FILE\n2. GET SIGNED URL\n3. GET EXTRACT DATA AFTER USING MISTRAL OCR"
      }
    },
    {
      "id": "64cef90f-5a5f-4e09-856f-fc66d1b58b7f",
      "name": "Google Drive(brand related data for chatbot)",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1056,
        1328
      ]
    },
    {
      "id": "3168eaff-b21c-4ff8-81f1-7c4b8605e66b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        1200
      ],
      "parameters": {
        "width": null,
        "height": 288,
        "content": "## load folder with all need for website chatbot"
      }
    },
    {
      "id": "99e919d1-5a9c-436b-af53-245a29f35377",
      "name": "Google Drive(load file)",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -464,
        1344
      ]
    },
    {
      "id": "73883e55-221d-4a58-bfad-a93fb4e9c16c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        1216
      ],
      "parameters": {
        "width": 320,
        "height": 272,
        "content": "## load individual files"
      }
    },
    {
      "id": "2c3716a9-3731-4a29-913c-a0b20db6e767",
      "name": "Code(convert to chunks for loading into vector db)",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        1312
      ]
    },
    {
      "id": "8648ab70-4909-401c-896e-7598eb0dd2ed",
      "name": "prepare for chunking",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1312
      ]
    },
    {
      "id": "a028ac1b-6827-4255-bfc2-8060c77d889e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        1200
      ],
      "parameters": {
        "width": 416,
        "height": 272,
        "content": "## convert ocr output into chunks for loading into vector database"
      }
    },
    {
      "id": "c87dbc3d-1623-442b-a122-bf4d3a49a821",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        1200
      ],
      "parameters": {
        "width": 336,
        "height": 272,
        "content": "## qdrant vector store"
      }
    },
    {
      "id": "e1dcae50-2af5-42e2-89f2-3ccd8ebab25e",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -368,
        720
      ]
    },
    {
      "id": "5f5aeada-4156-4212-8069-f36e5cec577b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        400
      ],
      "parameters": {
        "width": 800,
        "height": 512,
        "content": "## website chat agent \n\nreply to user query either from embedded chat or webhook"
      }
    },
    {
      "id": "659a7802-35ab-4e3d-a436-373e9e54767d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        640
      ],
      "parameters": {
        "width": 288,
        "height": 240,
        "content": "## chatbot from webhook"
      }
    },
    {
      "id": "891e023c-5823-4afd-8319-5a1e6b287890",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        384
      ],
      "parameters": {
        "width": 288,
        "height": 240,
        "content": "## embedded chat "
      }
    },
    {
      "id": "e1ef6116-da64-4c7f-aced-475fc182bf03",
      "name": "website chat agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        528
      ]
    },
    {
      "id": "21ecc7c5-7c25-4f5f-8aec-7d437d66e7c8",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        672
      ],
      "parameters": {
        "width": 576,
        "height": 336,
        "content": "## Website Chat + Document Intelligence Workflow\n\nEnables a **website chatbot** to answer user queries using **documents stored in Google Drive**.  \nThe workflow automatically **fetches, OCRs, chunks,"
      }
    }
  ],
  "connections": {
    "If2": {
      "main": [
        [
          {
            "node": "prepare for chunking",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Google Drive(load file)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "website chat agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set metadata": {
      "main": [
        [
          {
            "node": "Google Drive(load file)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "website chat agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Upload": {
      "main": [
        [
          {
            "node": "Mistral Signed URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral DOC OCR": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "Set metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "website chat agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Signed URL": {
      "main": [
        [
          {
            "node": "Mistral DOC OCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "website chat agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prepare for chunking": {
      "main": [
        [
          {
            "node": "Code(convert to chunks for loading into vector db)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive(load file)": {
      "main": [
        [
          {
            "node": "Mistral Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Mistral Cloud": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Mistral Cloud1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "website chat agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Google Drive(brand related data for chatbot)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive(brand related data for chatbot)": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code(convert to chunks for loading into vector db)": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}