{
  "name": "Chat with PDF / MD / text files using GraphRAG (no vector store needed)",
  "nodes": [
    {
      "id": "011910a9-c2a0-49eb-b1eb-8043e0c2accc",
      "name": "Search Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -220,
        -120
      ]
    },
    {
      "id": "22872ac5-14e4-4ea7-b792-30e19a02cb88",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        260,
        -120
      ]
    },
    {
      "id": "6456b7ac-f936-425a-a0ac-62fe118e985a",
      "name": "Retrieve File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        500,
        -80
      ]
    },
    {
      "id": "8c1f2da9-fff4-457d-bc2e-7c84de3500b3",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        740,
        -20
      ]
    },
    {
      "id": "fe133ad7-bd7a-43e2-91a7-4b3dd2652490",
      "name": "Extract from PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1020,
        -240
      ]
    },
    {
      "id": "49f89141-a8ea-46c6-888d-cf9dafcc7c2a",
      "name": "Extract from Text File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1020,
        -60
      ]
    },
    {
      "id": "a47d8f07-917e-44ed-a69e-5d6085981d36",
      "name": "Extract from Markdown",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1020,
        140
      ]
    },
    {
      "id": "a2298650-5408-45f8-accf-292ac669002a",
      "name": "InfraNodus Save to Graph",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1480,
        200
      ]
    },
    {
      "id": "bb06d60a-01c7-4a1e-bc7a-901e1f7f175d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -480
      ],
      "parameters": {
        "width": 2200,
        "height": 980,
        "content": "# Step 1: Upload Your PDF / MD / Text Files to InfraNodus GraphRAG\n\n## Copy your PDF files to a Google drive and then upload them to your InfraNodus knowledge graph\n\n### InfraNodus visualizes your tex"
      }
    },
    {
      "id": "38707a4d-b397-43e7-b55c-da18a00bb480",
      "name": "Map PDF to Text",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        -100
      ]
    },
    {
      "id": "49426e56-7d6c-4dc0-a279-348dea59cca2",
      "name": "Convert File to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        200
      ]
    },
    {
      "id": "5d21b250-7b0f-4925-a858-5aa6badf5700",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -340
      ],
      "parameters": {
        "width": 360,
        "height": 840,
        "content": "## Optional: Better PDF Conversion\n\n### Standard Map PDF to Text node will split your PDF files into very short chunks, which deteriorates retrieval. \n\nUse can use [ConvertAPI](https://convertapi.com?"
      }
    },
    {
      "id": "ceda9ea4-963b-4ffb-a741-6e7eb3fc7411",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -520,
        840
      ]
    },
    {
      "id": "d78cf21e-753b-44d3-a2b4-493f85aa5129",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -240,
        840
      ]
    },
    {
      "id": "02497c8b-89d6-4440-bc4d-d3906b9c4872",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -420,
        1100
      ]
    },
    {
      "id": "6d77fb59-fb03-4d22-ac40-4cf9bde25909",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -260,
        1100
      ]
    },
    {
      "id": "978c8309-380d-4fc8-b238-e0d0148b77b9",
      "name": "Knowledge Base GraphRAG",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        100,
        1060
      ]
    },
    {
      "id": "b005f83d-3d4a-42c8-b70a-63e267747fcd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        540
      ],
      "parameters": {
        "width": 2200,
        "height": 700,
        "content": "# Step 2: Chat with your PDF / MD / Text Files using [InfraNodus](https://infranodus.com) Graph RAG Knowledge Base\n\n## InfraNodus is used instead of the vector store. It combines traditional RAG and G"
      }
    },
    {
      "id": "6a6ad150-670d-45d5-a69e-0bafaf8f2ac4",
      "name": "Click ‘Test workflow’ to ingest the documents",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -500,
        -120
      ]
    },
    {
      "id": "0a148a3f-e898-4f83-9ebb-82da7f3f4633",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        100
      ],
      "parameters": {
        "width": 680,
        "height": 380,
        "content": "## [InfraNodus](https://infranodus.com) Knowledege Graph Example\n\n![InfraNodus knowledge graph](https://infranodus.com/images/front/infranodus-overview.jpg)"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Extract from PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract from Text File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract from Markdown",
            "type": "main",
            "index": 0
          }
        ],
        [],
        []
      ]
    },
    "Retrieve File": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Retrieve File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map PDF to Text": {
      "main": [
        [
          {
            "node": "InfraNodus Save to Graph",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from PDF": {
      "main": [
        [
          {
            "node": "Map PDF to Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search Google Drive": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from Markdown": {
      "main": [
        [
          {
            "node": "InfraNodus Save to Graph",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from Text File": {
      "main": [
        [
          {
            "node": "InfraNodus Save to Graph",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Knowledge Base GraphRAG": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "InfraNodus Save to Graph": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Click ‘Test workflow’ to ingest the documents": {
      "main": [
        [
          {
            "node": "Search Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}