{
  "name": "Upload Google Drive files to an InfraNodus graph",
  "nodes": [
    {
      "id": "5e1af4f1-c707-49fa-92f0-8c87ac899eea",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -480,
        -100
      ]
    },
    {
      "id": "ecec9d6b-e2db-4715-8edf-a986ae35dcc9",
      "name": "Search Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -220,
        -100
      ]
    },
    {
      "id": "d5c62cbf-6520-46b8-95e2-defffbc5a653",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        40,
        -100
      ]
    },
    {
      "id": "4182cf2b-5380-45b1-9c36-263af4835c0e",
      "name": "Retrieve File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        260,
        -180
      ]
    },
    {
      "id": "6d59a256-7824-4bc6-b3d3-ee79d5bac3e9",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        680,
        -20
      ]
    },
    {
      "id": "de37bfa9-552d-4adb-943f-bebd6cafed4d",
      "name": "Extract from PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        920,
        -260
      ]
    },
    {
      "id": "3f321a4c-f608-48a6-a730-5550307e5e0e",
      "name": "Extract from Text File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        920,
        -60
      ]
    },
    {
      "id": "11a07c7e-2134-4935-b881-3b63aa72c019",
      "name": "Extract from Markdown",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        920,
        140
      ]
    },
    {
      "id": "cc9f9e17-3385-4199-943d-e984f2dac9f9",
      "name": "InfraNodus Save to Graph",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1580,
        240
      ]
    },
    {
      "id": "0807fb37-d747-4cba-b743-92febf88a23d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -360
      ],
      "parameters": {
        "width": 500,
        "height": 520,
        "content": "## 1. Retrieve the files from a Google Drive folder\n\n### You need to create the folder first and upload the files there. \n\n🚨 Specify the folder you want to use here"
      }
    },
    {
      "id": "9a28e9c8-d425-44ca-9754-61e12d921ba6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -360
      ],
      "parameters": {
        "width": 500,
        "height": 520,
        "content": "## 2. Iterate through every file extracted\n\n### We get the ID of the file and iterate through them one by one\n\n\n"
      }
    },
    {
      "id": "4c9105f8-8e3e-4b92-9543-d16902d19587",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        -520
      ],
      "parameters": {
        "width": 500,
        "height": 840,
        "content": "## 3. Extract text from the files\n\n### Use the built-in n8n extractor tools to convert different file formats: PDF, txt, or markdown to plain text.\n\n"
      }
    },
    {
      "id": "4e79cffa-4251-44d3-a950-aae699d5f738",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -380
      ],
      "parameters": {
        "width": 500,
        "height": 840,
        "content": "## 4. Save the file to InfraNodus\n\n### Save the text content of the file to the graph, using its name as category (so you can manually delete it after) and additional processing settings (in the `body"
      }
    },
    {
      "id": "19494d9a-848e-4a8d-a3a6-0dcd5d9ab12b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -1400
      ],
      "parameters": {
        "width": 1060,
        "height": 980,
        "content": "# Upload Google Drive files to an InfraNodus graph\n\n## This workflow uploads the files in your Google drive to your [InfraNodus graph](https://infranodus.com). \n\n### InfraNodus visualizes your text as"
      }
    },
    {
      "id": "4851a559-bcc3-487f-bfdf-ea7c8c40b11f",
      "name": "Map PDF to Text",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        -100
      ]
    },
    {
      "id": "62ca951d-1142-4152-ac74-531865c56735",
      "name": "Convert File to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1940,
        60
      ]
    },
    {
      "id": "1c459501-ddb5-44a8-a531-0eac9e3c9a29",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1780,
        -380
      ],
      "parameters": {
        "width": 500,
        "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?"
      }
    }
  ],
  "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
          }
        ]
      ]
    },
    "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
          }
        ]
      ]
    },
    "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
          }
        ]
      ]
    },
    "InfraNodus Save to Graph": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Search Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}