{
  "id": "WceMkVib0VLlF1BZ",
  "meta": {
    "instanceId": "workflow-c4828a28",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:52.148504",
    "updatedAt": "2025-09-29T07:07:52.148519",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "Vector DB Loader from Google Drive",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "nodes": [
    {
      "id": "6652e41a-d14a-4e17-9dcd-34df114d219a",
      "name": "Default Data Loader",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1240,
        1100
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1,
      "notes": "This documentDefaultDataLoader node performs automated tasks as part of the workflow."
    },
    {
      "id": "8ae38b72-52fd-46bc-ab47-50bebe5ac4ee",
      "name": "Recursive Character Text Splitter",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1320,
        1300
      ],
      "parameters": {
        "options": {},
        "chunkOverlap": 50
      },
      "typeVersion": 1,
      "notes": "This textSplitterRecursiveCharacterTextSplitter node performs automated tasks as part of the workflow."
    },
    {
      "id": "57ce64af-88d4-4dc4-8c8e-01717c1bd47d",
      "name": "Embeddings OpenAI",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1120,
        1100
      ],
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "fzLcLisovaZjIqma",
          "name": "AlexK OpenAi account"
        }
      },
      "typeVersion": 1,
      "notes": "This embeddingsOpenAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "e6bed8bc-f629-41fd-aa6e-9158b1cbc323",
      "name": "Postgres PGVector Store",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1140,
        880
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "collection": {
            "values": {
              "useCollection": true,
              "collectionName": "n8n_wfs"
            }
          }
        },
        "tableName": "n8n_vectors_wfs"
      },
      "credentials": {
        "postgres": {
          "id": "UkNm7VVkmuXOwMVa",
          "name": "KBB Postgres account"
        }
      },
      "typeVersion": 1.1,
      "notes": "This vectorStorePGVector node performs automated tasks as part of the workflow."
    },
    {
      "id": "96fbc1f3-920d-44c9-9314-742efa3a698a",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -280,
        740
      ],
      "parameters": {},
      "typeVersion": 1,
      "notes": "This manualTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "4cd7a934-04cc-47b5-a771-db554680ba77",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        160,
        740
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3,
      "notes": "This splitInBatches node performs automated tasks as part of the workflow."
    },
    {
      "id": "778593d8-fe1c-4eb9-865a-e6ce9ed5f900",
      "name": "Move File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1500,
        880
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Loop Over Items').item.json.id }}"
        },
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1Re6vg-PZxBoUU6sTRDbGs-77bAJ40u8F",
          "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
          "cachedResultName": "vectorized"
        },
        "operation": "move"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "kxXwhBLKOmB8CkBW",
          "name": "AlexK Google Drive account"
        }
      },
      "typeVersion": 3,
      "notes": "This googleDrive node performs automated tasks as part of the workflow."
    },
    {
      "id": "3a6584f5-ed86-4900-9177-40ffe82d0ad3",
      "name": "Download File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        380,
        680
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "kxXwhBLKOmB8CkBW",
          "name": "AlexK Google Drive account"
        }
      },
      "typeVersion": 3,
      "notes": "This googleDrive node performs automated tasks as part of the workflow."
    },
    {
      "id": "e1931ab6-4391-46c3-9d7d-22cbfbf90327",
      "name": "Search Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -60,
        740
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "1mBHrP8UzUnfn3dj_3QS1r0XhQQyVPAGX",
            "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
            "cachedResultName": "n8n Workflow JSON Files"
          },
          "whatToSearch": "files"
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "kxXwhBLKOmB8CkBW",
          "name": "AlexK Google Drive account"
        }
      },
      "typeVersion": 3,
      "notes": "This googleDrive node performs automated tasks as part of the workflow."
    },
    {
      "id": "95134ab4-806f-4c47-96a6-e261b3176ebf",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -280,
        940
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 3
            }
          ]
        }
      },
      "typeVersion": 1.2,
      "notes": "This scheduleTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "0fe604ed-e886-4aa3-856f-c46fb79ce0de",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        960
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## Creative Commons License\n*License*: **Creative Commons Attribution-ShareAlike 4.0 International** (CC BY-SA 4.0)\n\n*Author*: **AlexK1919**\nYou are free to use, adapt, and share this workflow—even commercially—under the terms of this license.\n\nFull license details: {{ $env.WEBHOOK_URL }}"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "f8055452-b487-46c7-92fe-14b3c88d193f",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        560,
        680
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "7b4e792b-ab6d-4b9b-88a1-d8e51bea6853",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$binary[\"data\"].mimeType}}",
                    "rightValue": "application/pdf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "09b7d7c5-5353-4719-b4e2-072e4da39948",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$binary[\"data\"].mimeType}}",
                    "rightValue": "text/plain"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d2763a45-a592-47c8-868f-59dfcd17a71c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$binary[\"data\"].mimeType}}",
                    "rightValue": "application/json"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2,
      "notes": "This switch node performs automated tasks as part of the workflow."
    },
    {
      "id": "c704f48e-a1f5-4539-bde2-545862d21bc6",
      "name": "Extract from PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        780,
        480
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1,
      "notes": "This extractFromFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "63b3a751-5726-4821-8379-72af15226584",
      "name": "Extract from Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        780,
        680
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1,
      "notes": "This extractFromFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "44a5980a-17aa-4a09-8040-a7d9804c7998",
      "name": "Extract from JSON",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        780,
        880
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson"
      },
      "typeVersion": 1,
      "notes": "This extractFromFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "error-f610b48e",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "UTC",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "versionId": "4f54c70a-b18b-4e4c-8959-ace70dd41218",
  "connections": {
    "57ce64af-88d4-4dc4-8c8e-01717c1bd47d": {
      "main": [
        [
          {
            "node": "error-handler-57ce64af-88d4-4dc4-8c8e-01717c1bd47d-bd69046d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "778593d8-fe1c-4eb9-865a-e6ce9ed5f900": {
      "main": [
        [
          {
            "node": "error-handler-778593d8-fe1c-4eb9-865a-e6ce9ed5f900-40c39dfe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3a6584f5-ed86-4900-9177-40ffe82d0ad3": {
      "main": [
        [
          {
            "node": "error-handler-3a6584f5-ed86-4900-9177-40ffe82d0ad3-c76bb09b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e1931ab6-4391-46c3-9d7d-22cbfbf90327": {
      "main": [
        [
          {
            "node": "error-handler-e1931ab6-4391-46c3-9d7d-22cbfbf90327-487a722f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c704f48e-a1f5-4539-bde2-545862d21bc6": {
      "main": [
        [
          {
            "node": "error-handler-c704f48e-a1f5-4539-bde2-545862d21bc6-c2f55b84",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "63b3a751-5726-4821-8379-72af15226584": {
      "main": [
        [
          {
            "node": "error-handler-63b3a751-5726-4821-8379-72af15226584-79256f04",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "44a5980a-17aa-4a09-8040-a7d9804c7998": {
      "main": [
        [
          {
            "node": "error-handler-44a5980a-17aa-4a09-8040-a7d9804c7998-3c0fe060",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "Automated workflow: Vector DB Loader from Google Drive. This workflow integrates 12 different services: stickyNote, textSplitterRecursiveCharacterTextSplitter, scheduleTrigger, googleDrive, switch. It contains 22 nodes and follows best practices for error handling and security.",
  "notes": "Excellent quality workflow: Vector DB Loader from Google Drive. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}