{"product_id":"n8n-google-drive-to-pgvector-embeddings-openai-langchain","title":"n8n Google Drive to PGVector Embeddings (OpenAI + LangChain)","description":"\u003ch3\u003eAutomatically turn your Google Drive documents into PGVector embeddings—no manual indexing required\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches a Google Drive folder for new files, extracts their text, generates OpenAI \u003cstrong\u003etext-embedding-3-small\u003c\/strong\u003e embeddings with \u003cstrong\u003eLangChain\u003c\/strong\u003e, and stores them in a \u003cstrong\u003ePostgres + PGVector\u003c\/strong\u003e database for semantic search and RAG use cases. Once embedded, files are moved to a separate “vectorized” folder to prevent duplication.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMonitors a Google Drive folder\u003c\/strong\u003e for new content (manual trigger or scheduled run; default is \u003cstrong\u003e3 AM daily\u003c\/strong\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSupports multiple file types\u003c\/strong\u003e: \u003cstrong\u003ePDF\u003c\/strong\u003e, \u003cstrong\u003eTXT\u003c\/strong\u003e, and \u003cstrong\u003eJSON\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts and splits text\u003c\/strong\u003e using a \u003cstrong\u003eLangChain Text Splitter\u003c\/strong\u003e approach (implemented via batching and file extraction steps).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates embeddings\u003c\/strong\u003e using OpenAI with the \u003cstrong\u003etext-embedding-3-small\u003c\/strong\u003e model.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStores vectors in Postgres with PGVector\u003c\/strong\u003e so your data becomes query-ready for semantic retrieval.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents re-processing\u003c\/strong\u003e by moving successfully processed files to a dedicated “vectorized” folder.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRAG AI agents\u003c\/strong\u003e that need ongoing knowledge ingestion from private documents\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSemantic search\u003c\/strong\u003e across internal PDFs, notes, and JSON content\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomated document pipelines\u003c\/strong\u003e for indexing, classification, or downstream AI workflows\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eKnowledge ingestion for AI assistants\u003c\/strong\u003e without manual chunking or embedding jobs\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Google Drive OAuth2 (Search Folder, Download File, Move File)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI\/embeddings:\u003c\/strong\u003e OpenAI Embeddings (\u003cem\u003etext-embedding-3-small\u003c\/em\u003e) + LangChain Text Splitter\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVector storage:\u003c\/strong\u003e Postgres with \u003cstrong\u003ePGVector\u003c\/strong\u003e (Postgres PGVector Store node)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow behavior:\u003c\/strong\u003e Manual trigger or Scheduled trigger, batch splitting, file extraction, and deduplication via folder move\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45767904067763,"sku":"N8N-3647","price":57.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/NbCRyXPZDMziveZZp3a-7_mI1YdA6L.png?v=1786093992","url":"https:\/\/buyflowscripts.com\/products\/n8n-google-drive-to-pgvector-embeddings-openai-langchain","provider":"N8N Commerce","version":"1.0","type":"link"}