{
  "id": "9Kv1TmgV5VxVUUH0",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Local RAG Indexer (n8n + Qdrant + Ollama)",
  "tags": [],
  "nodes": [
    {
      "id": "002111ae-d102-4a0d-b508-c5004d3134a0",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        176,
        -48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ecf92f10-ccbb-464b-81a1-1061e29e488a",
      "name": "Read/Write Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        384,
        -48
      ],
      "parameters": {
        "options": {},
        "fileSelector": "example: /path/to/your/document.txt"
      },
      "executeOnce": true,
      "notesInFlow": false,
      "retryOnFail": true,
      "typeVersion": 1.1,
      "alwaysOutputData": true
    },
    {
      "id": "6b78dc27-05d8-426f-9660-f4577821065f",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        592,
        -48
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1.1
    },
    {
      "id": "15e1c2bd-1ee2-48fe-ac00-779724188901",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        800,
        -48
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "qdrantCollection": {
          "__rl": true,
          "mode": "id",
          "value": "handbook"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "ece5b976-a62e-40c3-860b-fb0e970da37b",
      "name": "Embeddings Ollama",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        880,
        160
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "636439be-a4a7-4410-a5f4-29e64575092b",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1008,
        128
      ],
      "parameters": {
        "options": {},
        "textSplittingMode": "custom"
      },
      "typeVersion": 1.1
    },
    {
      "id": "4cab5b92-f331-4e41-af01-0eafc0c5a3ac",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1104,
        336
      ],
      "parameters": {
        "options": {},
        "chunkOverlap": 200
      },
      "typeVersion": 1
    },
    {
      "id": "9246ca7a-7c77-4e21-86cb-aee755d2445c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -320
      ],
      "parameters": {
        "color": "#5B0617",
        "width": 288,
        "height": 80,
        "content": "AIR-GAPPED DOCUMENT INGESTION & VECTOR MAPPING"
      },
      "typeVersion": 1
    },
    {
      "id": "936e6b49-ba5f-41d3-a078-7c032145def4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -208
      ],
      "parameters": {
        "color": "#000000",
        "width": 1008,
        "height": 80,
        "content": "Pipeline: Local File Ingestion \u2192 Recursive Character Splitting (1,000-char / 200 overlap) \u2192 Local Embeddings (nomic-embed-text)\nSecurity: 100% On-Premise Indexing | Zero Data Leakage | 1 Document Mapped to 13 Semantic Vector Chunks in Qdrant"
      },
      "typeVersion": 1
    },
    {
      "id": "659eb643-5d81-469b-86b4-33a69adabdf2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        144
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 320,
        "content": "SETUP STEP 1: Point this node at your own file.\n\nDouble click the \"Read/Write Files from Disk\" node above.\n\nReplace the file path with the path to your own document.\n\nThis example uses a plain .txt file for PDFs, swap the \"Extract from File\" node's operation to PDF.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a89c6dad-715a-4189-b57d-ac3d77e2dc9f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        144
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "content": "SETUP STEP 2: Requires Ollama running on your computer, with the nomic-embed-text model installed.\n\nInstall Ollama, then in your terminal run:\nollama pull nomic-embed-text"
      },
      "typeVersion": 1
    },
    {
      "id": "e482b63d-268e-4448-b5c7-1724b01253a4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 512,
        "content": "SETUP STEP 3: Create a Qdrant credential in n8n\n(your Qdrant URL + API key) and set a Collection Name\non this node. \n\nWrite that collection name down you must\ntype the EXACT SAME name into the \"Ask\" workflow's\nQdrant node, or that workflow will find nothing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f16ce64c-8d7e-4e90-b37f-9477dadc9efa",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        528
      ],
      "parameters": {
        "width": 416,
        "height": 176,
        "content": "HOW TO RUN: Click the orange \"Execute workflow\" button\nto index a document. \n\nRun this once per new document,\nbefore using the \"Ask\" workflow to query it.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0dbaec2c-4344-4f2e-ac89-3df974070eba",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -64
      ],
      "parameters": {
        "width": 512,
        "height": 224,
        "content": " IMPORTANT: This node only sees files inside your Docker\ncontainer's mounted volume, not your whole computer.\n\nCopy your document into the folder your docker-compose.yml\nmounts (commonly \"./shared\") and reference the CONTAINER\npath here (e.g. /data/shared/yourfile.pdf), not the Mac path.\n\nThis workflow will not work on n8n Cloud only self-hosted.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "4e11216a-4ff4-478a-8b0a-4e21b842129d",
  "nodeGroups": [],
  "connections": {
    "Embeddings Ollama": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}