{
  "name": "Chat with Google Drive documents using GPT, Pinecone, and RAG",
  "nodes": [
    {
      "id": "b30ce82d-44b4-46d7-810c-eb64257b4327",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        60,
        400
      ]
    },
    {
      "id": "18f18c72-0066-4803-8128-5d7d143d2c85",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        100,
        620
      ]
    },
    {
      "id": "950f35d8-fb93-4b6f-b528-c47c25c60301",
      "name": "Vector Store Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        300,
        420
      ]
    },
    {
      "id": "5603154c-8a32-48f5-9750-1e2aca633e31",
      "name": "Generate Embeddings for Search with OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        200,
        760
      ]
    },
    {
      "id": "dfd9a08b-ec49-48a5-984f-55cc270de0ae",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        580,
        720
      ]
    },
    {
      "id": "2b385fec-c2f9-43a9-bb28-e42b38346c44",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -960,
        340
      ]
    },
    {
      "id": "5431b1f1-1c98-4073-a15e-f46bc04a9481",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -820,
        240
      ]
    },
    {
      "id": "f4ffd33e-8a9b-4f5a-b4a9-ec286b13ce68",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        -660,
        400
      ]
    },
    {
      "id": "918aa3af-19fa-48d3-8669-3dc841a9ba0b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -80
      ],
      "parameters": {
        "width": 614.6875,
        "height": 731.1875,
        "content": "## 2. Create a Vector Store\n[Read more about the In-Memory Vector Store](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory/)"
      }
    },
    {
      "id": "95668d63-a834-47a2-82f3-3039d2cb9d84",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -60
      ],
      "parameters": {
        "width": 746.6875,
        "height": 929.1875,
        "content": "## 4. AI Agent Responds\n[Learn more about using AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nn8n's AI agents are powerful nodes which make "
      }
    },
    {
      "id": "f2a080c7-5fbe-4426-b7d7-226934e76f3f",
      "name": "AI Sales Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        60,
        220
      ]
    },
    {
      "id": "20a21f7b-e05e-4300-853e-7c1efbb6dfc7",
      "name": "Download File From Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1260,
        140
      ]
    },
    {
      "id": "c81c5d09-a9d2-41b1-a0a6-d00eb1a7b58a",
      "name": "Google Drive File Updated",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -1580,
        360
      ]
    },
    {
      "id": "186f3de8-cdb9-4190-91ec-aceba939a70c",
      "name": "Google Drive File Created",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -1580,
        160
      ]
    },
    {
      "id": "91e7cd3d-e35b-4483-b092-0350873fdb7c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2060,
        -680
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "## Add documents to vector store when updating or creating new documents in Google Drive"
      }
    },
    {
      "id": "bcda0f55-7251-48b0-b3ed-b2739b151dbe",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        -60
      ],
      "parameters": {
        "width": 640,
        "height": 655,
        "content": "## 1. Build Databse\n[Read more about the HTTP Request Tool](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nImport your marketing PDF document to build your vector sto"
      }
    },
    {
      "id": "d74cef89-3f35-4a1e-b0db-fcced3f11227",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -240,
        220
      ]
    },
    {
      "id": "d1ecb940-335c-40c9-9880-d899b50aaa1b",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        -900,
        40
      ]
    },
    {
      "id": "4e62dd9c-6c3a-4f13-9f0f-fef2df99a304",
      "name": "Pinecone Vector Store (Retrieval)",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        280,
        600
      ]
    },
    {
      "id": "0efaa10f-2908-41a6-aeda-cd54c168f4ba",
      "name": "Download File From Google Drive1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1300,
        380
      ]
    }
  ],
  "connections": {
    "AI Sales Agent": {
      "main": [
        []
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store (Retrieval)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Sales Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Sales Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Vector Store Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Sales Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive File Created": {
      "main": [
        [
          {
            "node": "Download File From Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive File Updated": {
      "main": [
        [
          {
            "node": "Download File From Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Sales Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File From Google Drive": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store (Retrieval)": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}