AutomationFlows β€Ί AI & RAG β€Ί Index Documents From Google Drive to Pinecone with Openai Embeddings for RAG

Index Documents From Google Drive to Pinecone with Openai Embeddings for RAG

ByAutomate With Marc @marconiβœ“ on n8n.io

🧠 Google Drive Upload Trigger β†’ Pinecone Vector Upsert for Document Indexing Category: AI & LLM / Document Indexing Level: Intermediate Tags: Google Drive, Pinecone, OpenAI, Embeddings, Vector Store, LangChain, RAG

Event triggerβ˜…β˜…β˜…β˜…β˜† complexityAI-powered14 nodesGoogle DrivePinecone Vector StoreOpenAI EmbeddingsDocument Default Data LoaderText Splitter Recursive Character Text SplitterGoogle Drive Trigger
AI & RAG Trigger: Event Nodes: 14 Complexity: β˜…β˜…β˜…β˜…β˜† AI nodes: yes Added:

This workflow corresponds to n8n.io template #4552 β€” we link there as the canonical source.

This workflow follows the Documentdefaultdataloader β†’ OpenAI Embeddings recipe pattern β€” see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide β†’

Download .json
{
  "id": "OceYxCmiuf5W2X4y",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Bundle RAG Upload",
  "tags": [],
  "nodes": [
    {
      "id": "e72ec6be-08f3-4195-b429-34c0870ee1bc",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        180,
        0
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "17cefWWyf-yKZVpCLHFVOlpfuqQpLl8QW",
            "cachedResultUrl": "https://drive.google.com/drive/folders/17cefWWyf-yKZVpCLHFVOlpfuqQpLl8QW",
            "cachedResultName": "Folder for n8n"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "82a0bcb2-35e0-4897-b2a5-2e8d22fdec43",
      "name": "Get Docs",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        440,
        0
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "61fc1b10-4a5e-4f12-82c1-c1c7d64c7901",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        660,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "95a8e03c-bd70-4742-b4ad-6bf3a9b484a2",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        900,
        20
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "pineconeNamespace": "Redacted"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "Redacted",
          "cachedResultName": "Redacted"
        }
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8d762bd6-d64f-4e01-bf9d-8183b7cd7555",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        920,
        160
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "80c20301-9fdd-455a-85eb-f0f5b12091be",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1060,
        240
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "Type",
                "value": "Redacted"
              }
            ]
          }
        },
        "dataType": "binary"
      },
      "typeVersion": 1
    },
    {
      "id": "9b849c85-fa99-4f2d-bdd5-02fababbc361",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1140,
        380
      ],
      "parameters": {
        "options": {},
        "chunkSize": 600,
        "chunkOverlap": 60
      },
      "typeVersion": 1
    },
    {
      "id": "a18e5576-6e16-487f-9347-2de39ecd7708",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -60,
        0
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": ""
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b82cc00a-56f9-41e9-9257-9a054c971db7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -120
      ],
      "parameters": {
        "color": 4,
        "width": 260,
        "height": 400,
        "content": "Google Folder Upload Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "aca97112-2f76-44ab-b5ae-aa232bd1242c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -120
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 400,
        "content": "Google Search File from Folder"
      },
      "typeVersion": 1
    },
    {
      "id": "7cf71e7a-db76-43b5-a8fd-c377ac4187aa",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -120
      ],
      "parameters": {
        "color": 2,
        "width": 220,
        "height": 400,
        "content": "Get File"
      },
      "typeVersion": 1
    },
    {
      "id": "ee27b02f-4d74-49f7-a3fd-5d0e928ac556",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -120
      ],
      "parameters": {
        "color": 3,
        "width": 500,
        "height": 680,
        "content": "Upload to Pinecone Vector"
      },
      "typeVersion": 1
    },
    {
      "id": "ec38ac32-c4a8-47fb-9312-c8804590a891",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -120
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 400,
        "content": "Loop for multiple files"
      },
      "typeVersion": 1
    },
    {
      "id": "4db0ce4b-77d2-4875-963c-10f61438128e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -120
      ],
      "parameters": {
        "color": 3,
        "width": 580,
        "height": 1300,
        "content": "\ud83e\udde0 Google Drive Upload Trigger \u2192 Pinecone Vector Upsert for Document Indexing\n\n\ud83d\udcc4 What This Workflow Does\nThis workflow watches a specific Google Drive folder and automatically uploads any newly added document to a Pinecone vector database \u2014 complete with OpenAI-generated embeddings.\n\nPerfect for setting up retrieval-augmented generation (RAG) pipelines, semantic search, or document Q&A systems. Once configured, your knowledge base stays up-to-date with zero manual effort.\n\nWatch Full Video Step-by-step guide here:\nhttps://www.youtube.com/@Automatewithmarc\n\n\ud83d\udd27 How It Works\n\ud83d\udcc1 Google Drive Trigger\nWatches a specific folder and triggers when new documents are uploaded.\n\n\ud83d\udd0d Google Drive File Search & Download\nFinds and fetches all files in the folder.\n\n\ud83d\udd04 Loop Over Each File\nHandles batch processing for multiple files.\n\n\ud83d\udcc3 Document Loader\nParses each file as binary and applies custom metadata like document type.\n\n\u2702\ufe0f Text Splitter\nBreaks content into manageable chunks for embedding (e.g., 600 characters, 60 overlap).\n\n\ud83e\udde0 OpenAI Embeddings\nGenerates vector embeddings using OpenAI.\n\n\ud83d\udce6 Pinecone Vector Store\nInserts/upserts documents into a specific Pinecone namespace for search-ready indexing.\n\n\ud83e\udde0 Why This is Useful\nThis is a production-grade setup for:\n\nBuilding vector search tools over internal docs\n\nFeeding up-to-date data into RAG agents or chatbots\n\nAuto-tagging and chunking files for scalable AI workflows\n\nWhether you\u2019re indexing document outlines, SOPs, or technical docs \u2014 this automation keeps your vector store fresh and organized.\n\n\ud83e\ude9c Setup Instructions\nConnect your Google Drive, OpenAI, and Pinecone accounts.\n\nSpecify the Google Drive folder to monitor.\n\nCustomize metadata, chunk size, or vector namespace as needed.\n\nActivate the workflow and drop a file into the folder \u2014 magic happens behind the scenes.\n\n\ud83d\udccc Notes\nWorks best with PDFs or text-based documents.\n\nYou can swap out OpenAI with other embedding models if needed.\n\nConsider adding notifications or logging (e.g., via Slack or email) for better observability."
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f3a17075-083e-42bc-acfb-c4480b2fe716",
  "connections": {
    "Get Docs": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Get Docs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing β€” you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

🧠 Google Drive Upload Trigger β†’ Pinecone Vector Upsert for Document Indexing Category: AI & LLM / Document Indexing Level: Intermediate Tags: Google Drive, Pinecone, OpenAI, Embeddings, Vector Store, LangChain, RAG

Source: https://n8n.io/workflows/4552/ β€” original creator credit. Request a take-down β†’

More AI & RAG workflows β†’ Β· Browse all categories β†’

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th

OpenAI, Gmail, Text Classifier +16
AI & RAG

Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Goog

@Devlikeapro/N8N Nodes Waha, Google Drive Trigger, @Apify/N8N Nodes Apify +14
AI & RAG

This n8n workflow implements a fully automated Retrieval-Augmented Generation (RAG) pipeline powered by Google Drive, OpenAI embeddings, and Pinecone.

Pinecone Vector Store, Document Default Data Loader, Text Splitter Recursive Character Text Splitter +10
AI & RAG

This workflow is built for individuals, teams, and businesses that receive regular inquiries via email and want to automate responses in a way that’s intelligent, brand-aligned, and always up to date.

OpenAI Chat, Tool Vector Store, Pinecone Vector Store +14
AI & RAG

Deploy a personal AI assistant that answers recruiter questions about your skills and projects, then automatically emails your CV as a PDF attachment when requested. Upload your portfolio documents (r

Google Drive Trigger, Google Drive, Pinecone Vector Store +11