Google Drive company docs RAG workflow with Gemini and Pinecone
This n8n workflow monitors Google Drive folders with separate triggers for newly created and updated company documents. Files are fetched, split recursively, embedded with Google Gemini and written into a Pinecone vector index. When employees ask questions in chat, an AI agent retrieves matching sections with buffered memory.
- Catalogue ID
- #1626
- Functional nodes
- 15
- Connections
- 13
- Trigger
- googleDriveTrigger, chatTrigger
- AI layer
- AI-assisted
Business problem solved
Internal company handbooks and pricing sheets evolve continuously. Workflows that only index initial uploads leave outdated policy chunks in the vector store and mislead support and operations staff.
Trigger
Two Google Drive triggers watch file creation and file updates; a chat trigger handles staff queries.
Connected systems
- Google Drive
- Pinecone vector store
- Google Gemini
- Chat interface
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. Pinecone Vector Store (AI layer)
- 2. Embeddings Google Gemini (AI layer) (connects to Pinecone Vector Store)
- 3. Default Data Loader (AI layer) (connects to Pinecone Vector Store)
- 4. Recursive Character Text… (AI layer) (connects to Default Data Loader)
- 5. AI Agent (AI layer)
- 6. Vector Store Tool (AI layer) (connects to AI Agent)
- 7. Pinecone Vector Store… (AI layer) (connects to Vector Store Tool)
- 8. Embeddings Google Gemini… (AI layer) (connects to Pinecone Vector Store…)
- 9. Download File From Google… (Service and data) (connects to Pinecone Vector Store)
- 10. Google Drive File Updated (Trigger) (connects to Download File From Google…)
- 11. Google Drive File Created (Trigger) (connects to Download File From Google…)
- 12. Window Buffer Memory (AI layer) (connects to AI Agent)
- 13. When chat message received (Trigger) (connects to AI Agent)
- 14. Google Gemini Chat Model (AI layer) (connects to AI Agent)
- 15. Google Gemini Chat Model… (AI layer) (connects to Vector Store Tool)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
Create and update detection
Dual Google Drive triggers fetch both newly uploaded documents and revised files from the company folder.
- 02
Document loading and splitting
The default data loader and recursive character splitter break long company guides into structured text chunks.
- 03
Gemini embeddings to Pinecone
Google Gemini generates embeddings and writes the resulting vectors into your Pinecone index.
- 04
Grounded Gemini chat retrieval
The AI agent reads buffered window memory and queries Pinecone through the vector store tool.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags across its 15 functional nodes and 13 connections.
Production layer added by ALTAI
During live deployment, ALTAI adds prior-vector deletion before re-indexing updated files, folder permission filters, source citation rules and an indexing error queue.
Drive and Pinecone Gemini RAG workflow Frequently asked questions
Production hardening removes previous chunks tied to that file ID before writing the updated version so answers reflect current policy.
Yes. Both embedding and chat nodes can stay on Gemini or switch to an approved model hosted on your infrastructure.
Yes. Folder metadata tags control retrieval filters so restricted documents only answer authorised user roles.
Related n8n workflows
Milvus and Cohere Drive RAG agent
Watches Google Drive for new PDFs, extracts text, stores multilingual Cohere embeddings in Milvus and answers questions with OpenAI gpt-4o.
Google Drive Pinecone agent RAG
Fetches a Google Drive PDF, resets and populates a Pinecone namespace and connects Pinecone as an agent retrieval tool for gpt-4o-mini.
Pinecone cited structured RAG
Tags Google Drive documents with file metadata in Pinecone, retrieves numbered chunks and enforces structured citations mapped back to source URLs.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms