{
  "name": "Chat with PDF, CSV, and JSON documents using Google Gemini RAG",
  "nodes": [
    {
      "id": "b558578b-4be9-4fb0-b339-ed135510ec28",
      "name": "Document Upload Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -704,
        -192
      ]
    },
    {
      "id": "285ec04b-4619-479a-b50e-b4a57ef6a330",
      "name": "Add Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        -512,
        -192
      ]
    },
    {
      "id": "fabb9bbe-9bac-4dbd-b854-fa7b8dede758",
      "name": "Vector Store Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        -256,
        -192
      ]
    },
    {
      "id": "f73dc9fd-da62-4435-804e-be58a1c919da",
      "name": "Document Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -176,
        48
      ]
    },
    {
      "id": "f5f283b0-7584-4404-8b3c-aac6c725b4ea",
      "name": "Chatbot Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1568,
        304
      ]
    },
    {
      "id": "dffdf4a3-c72c-4f55-bb55-0ab1c7e804bb",
      "name": "Knowledge Base Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1360,
        304
      ]
    },
    {
      "id": "1bb26476-a290-4cf2-8243-3fa7bd658617",
      "name": "Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1264,
        480
      ]
    },
    {
      "id": "f4ca267b-9623-4a8f-8698-fc771185fc4b",
      "name": "Embeddings Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        -320,
        48
      ]
    },
    {
      "id": "a1b48a08-63f2-4f8e-a905-df7545affc08",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1424,
        480
      ]
    },
    {
      "id": "dd4ea245-64ad-4243-9741-8512e51fa0c3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -240
      ],
      "parameters": {
        "width": 992,
        "height": 608,
        "content": "## Document Ingestion"
      }
    },
    {
      "id": "8b98eaff-7c1c-4621-8c25-c5ff3292a563",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        160
      ],
      "parameters": {
        "width": 800,
        "height": 560,
        "content": "## Chat and AI response"
      }
    },
    {
      "id": "249ef950-2c97-4a43-abd4-7e7316a318d2",
      "name": "Vector Store Retrieve",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        -1120,
        480
      ]
    },
    {
      "id": "2660e12e-00c0-48dd-918d-f2195b7b9d84",
      "name": "Token Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        -176,
        208
      ]
    },
    {
      "id": "fa62450f-95da-47db-9fce-7781e38ae8db",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -944
      ],
      "parameters": {
        "width": 1488,
        "height": 624,
        "content": "## Chat with PDF, CSV, and JSON documents using AI\n\nThis workflow turns uploaded documents into an AI-powered knowledge base. Users can upload PDF, CSV, or JSON files and ask questions about their con"
      }
    },
    {
      "id": "8546dc07-be90-4787-a15d-8160f874d97a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        -240
      ],
      "parameters": {
        "width": 368,
        "height": null,
        "content": "## Processes uploaded files and converts them into searchable embeddings used for semantic retrieval."
      }
    },
    {
      "id": "1ca4171f-0379-492a-9892-a0c628c8dd1f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        0
      ],
      "parameters": {
        "width": 368,
        "height": null,
        "content": "## Retrieves relevant document context and generates grounded AI answers using a RAG-based agent."
      }
    },
    {
      "id": "89ee1a7c-ffee-4274-b3df-db075ef59c98",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -240
      ],
      "parameters": {
        "width": 368,
        "height": 176,
        "content": "## Uses an in-memory vector store. Data resets when the workflow restarts. Replace with a persistent database for production use."
      }
    }
  ],
  "connections": {
    "Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Add Metadata": {
      "main": [
        [
          {
            "node": "Vector Store Insert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Document Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Chatbot Trigger": {
      "main": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document Loader": {
      "ai_document": [
        [
          {
            "node": "Vector Store Insert",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Document Upload Form": {
      "main": [
        [
          {
            "node": "Add Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Retrieve": {
      "ai_tool": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Vector Store Insert",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Vector Store Retrieve",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}