{"product_id":"index-new-google-drive-files-to-pinecone-with-openai-embeddings-n8n","title":"Index New Google Drive Files to Pinecone with OpenAI Embeddings (n8n)","description":"\u003ch3\u003eIndex every new Google Drive file into Pinecone—automatically (with OpenAI embeddings) in n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches a specific Google Drive folder for newly created files, generates OpenAI embeddings from the file contents, and upserts the resulting vectors into your Pinecone index—while using an n8n Data Table to prevent duplicate indexing by logging each ingested file ID.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns every minute\u003c\/strong\u003e: A \u003cem\u003eGoogle Drive Trigger\u003c\/em\u003e checks the selected folder for newly created files.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeduplicates by file ID\u003c\/strong\u003e: Before processing, it checks an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e to see whether the Google Drive file ID is already recorded as ingested.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads file content\u003c\/strong\u003e: New files are downloaded as \u003cstrong\u003ebinary data\u003c\/strong\u003e, then loaded into the workflow for text processing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSplits into overlapping chunks\u003c\/strong\u003e: The workflow splits the content into chunks (with overlap) and attaches metadata including \u003cstrong\u003efile ID\u003c\/strong\u003e and \u003cstrong\u003efile name\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates OpenAI embeddings\u003c\/strong\u003e: Each chunk is embedded using an OpenAI embeddings model (e.g., \u003ccode\u003etext-embedding-3-small\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpserts into Pinecone\u003c\/strong\u003e: The chunk vectors plus metadata are inserted into the specified Pinecone index.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs ingestion for future runs\u003c\/strong\u003e: It records \u003cstrong\u003efile ID\u003c\/strong\u003e, \u003cstrong\u003efile name\u003c\/strong\u003e, and an \u003cstrong\u003eingestion timestamp\u003c\/strong\u003e in the same n8n Data Table to avoid re-embedding.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eBuild a \u003cstrong\u003eRAG-ready document index\u003c\/strong\u003e from files teams drop into a Google Drive folder.\u003c\/li\u003e\n  \u003cli\u003eAutomatically refresh Pinecone with \u003cstrong\u003enew documents\u003c\/strong\u003e without manual ingestion jobs.\u003c\/li\u003e\n  \u003cli\u003ePrevent costly re-embedding by \u003cstrong\u003etracking ingested Google Drive file IDs\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow triggers\u003c\/strong\u003e: Google Drive Trigger (runs every minute on new files in a selected folder)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStorage\/deduping\u003c\/strong\u003e: n8n \u003cstrong\u003eData Table\u003c\/strong\u003e (e.g., \u003ccode\u003erag_ingested_files\u003c\/code\u003e)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEmbeddings\u003c\/strong\u003e: OpenAI embeddings (choose a model such as \u003ccode\u003etext-embedding-3-small\u003c\/code\u003e)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVector database\u003c\/strong\u003e: Pinecone index (configured so the index dimension matches the embeddings model)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcessing\u003c\/strong\u003e: Uses chunking with metadata attachment (file ID, file name) and inserts chunk vectors into Pinecone\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eSet up Google Drive OAuth2 credentials, OpenAI API credentials, your Pinecone index, and the n8n Data Table ID used for deduplication\/logging—then let your Pinecone index stay continuously up to date.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45889864138931,"sku":"N8N-18602","price":4.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/FJmHhyaO6e1VMqH0Bs0R4_iXMIb3om.png?v=1787498758","url":"https:\/\/buyflowscripts.com\/products\/index-new-google-drive-files-to-pinecone-with-openai-embeddings-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}