{
  "name": "Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive",
  "nodes": [
    {
      "id": "250ff8ae-f645-4644-af93-f2148549ed86",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -940,
        580
      ]
    },
    {
      "id": "fbcc24b9-f983-49af-a7b9-dc78277e746c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -660,
        560
      ]
    },
    {
      "id": "03cfe40b-62ca-41af-ba97-80072e018e3d",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        -840,
        400
      ]
    },
    {
      "id": "5c16650c-44a9-4c5f-b8f2-d0e9e5a0f41d",
      "name": "Postgres Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        -720,
        380
      ]
    },
    {
      "id": "d975770d-0463-480c-aa70-33395f5f40b2",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        660,
        460
      ]
    },
    {
      "id": "a5282142-d4dc-40b9-bff9-93df5fc5905f",
      "name": "Ollama Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        400,
        360
      ]
    },
    {
      "id": "76a8d5b3-0c41-4f6c-b3c1-6a00ce555b23",
      "name": "Embeddings Ollama",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        480,
        520
      ]
    },
    {
      "id": "3d6d64f3-b1d3-4453-9f17-6d3a55273407",
      "name": "Answer questions with a vector store",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        620,
        320
      ]
    },
    {
      "id": "312d4235-a534-45f2-8cba-475b12874281",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        320
      ],
      "parameters": {
        "width": 660,
        "height": 480,
        "content": "## Local Rag AI AGENT  \n"
      }
    },
    {
      "id": "832d366c-3eb4-4845-8661-067fc12d278b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        240
      ],
      "parameters": {
        "width": 720,
        "height": 460,
        "content": "## Qdrant Vector store and Ollama Embeddings\n"
      }
    },
    {
      "id": "49d25a7c-432c-4794-ad49-c6dc57685120",
      "name": "File Created",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -760,
        900
      ]
    },
    {
      "id": "39b32d2b-b4c7-44de-8f86-f519be58e4b5",
      "name": "File Updated",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -760,
        1100
      ]
    },
    {
      "id": "b5cf9dc7-7bd9-41a3-b736-6417de3cf4b0",
      "name": "Set File ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -540,
        1000
      ]
    },
    {
      "id": "fee137e8-a785-4a07-a3f7-84f1d15438f8",
      "name": "Download File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -100,
        1000
      ]
    },
    {
      "id": "03adfdbf-1dc4-48c4-9263-5660f1abb505",
      "name": "Extract Document Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        120,
        1000
      ]
    },
    {
      "id": "5490338c-f7a4-4e14-a493-b2f3d60af56f",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        460,
        1222.5
      ]
    },
    {
      "id": "1bcb0f4f-92bb-40e6-a1a9-2a2acd232202",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        548,
        1420
      ]
    },
    {
      "id": "f3f1d04c-050e-4aa6-85b1-cbb4b3eaf591",
      "name": "Embeddings Ollama1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        340,
        1220
      ]
    },
    {
      "id": "066b5093-a034-43e8-a5ea-72aea5770d6c",
      "name": "Qdrant Vector Store Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        340,
        980
      ]
    },
    {
      "id": "d85eda28-8be7-4b0d-97bf-254c39a3f690",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -806.5,
        855
      ],
      "parameters": {
        "width": 1568.9362829025763,
        "height": 705.2695614889159,
        "content": "## Workflow to Create Local Knowledgebase from Google Drive Folder"
      }
    }
  ],
  "connections": {
    "Set File ID": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Created": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Updated": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Model": {
      "ai_languageModel": [
        [
          {
            "node": "Answer questions with a vector store",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Extract Document Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Ollama": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Ollama1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store Insert",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store Insert",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "Answer questions with a vector store",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Extract Document Text": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store Insert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Answer questions with a vector store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}