{"product_id":"n8n-google-drive-pinecone-sync-with-openai-embeddings","title":"n8n Google Drive → Pinecone Sync with OpenAI Embeddings","description":"\u003ch3\u003eKeep your Pinecone knowledge base perfectly synced with a Google Drive folder—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow extracts text from files in a specified \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e folder, generates \u003cstrong\u003eOpenAI embeddings\u003c\/strong\u003e, and upserts them into \u003cstrong\u003ePinecone\u003c\/strong\u003e with helpful metadata. It also tracks what’s been indexed, removes vectors for deleted files, and emails an admin via \u003cstrong\u003eGmail\u003c\/strong\u003e when unsupported formats are encountered.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers\u003c\/strong\u003e: Runs manually, on a daily schedule (3:00 AM), or when a new file is created in the configured Google Drive folder.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eScans Drive\u003c\/strong\u003e: Lists files in the target folder, skips temporary conversion\/OCR artifacts, and processes files one at a time.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIndex tracking\u003c\/strong\u003e: Uses an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e to skip files already indexed and unchanged since the last recorded modified time.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFile content extraction\u003c\/strong\u003e based on MIME type:\n    \u003cul\u003e\n      \u003cli\u003eExports \u003cstrong\u003eGoogle Docs\/Sheets\u003c\/strong\u003e for text extraction\u003c\/li\u003e\n      \u003cli\u003eExtracts text from \u003cstrong\u003ePDFs\u003c\/strong\u003e (including OCR-conversion for scanned PDFs)\u003c\/li\u003e\n      \u003cli\u003eParses \u003cstrong\u003eExcel\u003c\/strong\u003e files\u003c\/li\u003e\n      \u003cli\u003eDescribes \u003cstrong\u003eimages\u003c\/strong\u003e using \u003cstrong\u003eOpenAI Vision\u003c\/strong\u003e\n\u003c\/li\u003e\n      \u003cli\u003eConverts \u003cstrong\u003eDOCX\/PPTX\u003c\/strong\u003e to Google formats before export\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEmbedding + Pinecone sync\u003c\/strong\u003e:\n    \u003cul\u003e\n      \u003cli\u003eSplits extracted text into chunks\u003c\/li\u003e\n      \u003cli\u003eCreates OpenAI embeddings\u003c\/li\u003e\n      \u003cli\u003eDeletes existing Pinecone vectors for the same \u003cstrong\u003efileId\u003c\/strong\u003e\n\u003c\/li\u003e\n      \u003cli\u003eUpserts updated vectors with metadata (\u003cstrong\u003etitle\u003c\/strong\u003e, \u003cstrong\u003esource\u003c\/strong\u003e, \u003cstrong\u003efileId\u003c\/strong\u003e)\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCleanup\u003c\/strong\u003e: Updates the tracking table in the Data Table and removes Pinecone vectors + entries for files deleted from Drive.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUnsupported types\u003c\/strong\u003e: Sends a \u003cstrong\u003eGmail\u003c\/strong\u003e notification to the admin and records the skip to prevent repeated alerts.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomatically powering a RAG\/semantic search knowledge base from company documents stored in Google Drive\u003c\/li\u003e\n  \u003cli\u003eKeeping Pinecone embeddings current as documents are updated, added, or removed\u003c\/li\u003e\n  \u003cli\u003eMonitoring and triaging unsupported file formats via Gmail alerts\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\/Nodes\u003c\/strong\u003e: Google Drive, \u003cstrong\u003eGmail\u003c\/strong\u003e, \u003cstrong\u003en8n Data Table\u003c\/strong\u003e, and logic nodes including \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, and \u003cstrong\u003eno op\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore flow\u003c\/strong\u003e: MIME detection → content extraction (incl. OCR and Vision for images) → chunking → \u003cstrong\u003eOpenAI embeddings\u003c\/strong\u003e → Pinecone upsert with metadata\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45995014881459,"sku":"N8N-19424","price":22.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/r3ATd6pTk_BCpzBwNp8yK_3Ct6aFWW.png?v=1789031288","url":"https:\/\/buyflowscripts.com\/products\/n8n-google-drive-pinecone-sync-with-openai-embeddings","provider":"N8N Commerce","version":"1.0","type":"link"}