Company RAG and data queries

Google Drive company docs RAG workflow with Gemini and Pinecone

Short answer

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

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

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

Workflow architecture

  1. 1. Pinecone Vector Store (AI layer)
  2. 2. Embeddings Google Gemini (AI layer) (connects to Pinecone Vector Store)
  3. 3. Default Data Loader (AI layer) (connects to Pinecone Vector Store)
  4. 4. Recursive Character Text… (AI layer) (connects to Default Data Loader)
  5. 5. AI Agent (AI layer)
  6. 6. Vector Store Tool (AI layer) (connects to AI Agent)
  7. 7. Pinecone Vector Store… (AI layer) (connects to Vector Store Tool)
  8. 8. Embeddings Google Gemini… (AI layer) (connects to Pinecone Vector Store…)
  9. 9. Download File From Google… (Service and data) (connects to Pinecone Vector Store)
  10. 10. Google Drive File Updated (Trigger) (connects to Download File From Google…)
  11. 11. Google Drive File Created (Trigger) (connects to Download File From Google…)
  12. 12. Window Buffer Memory (AI layer) (connects to AI Agent)
  13. 13. When chat message received (Trigger) (connects to AI Agent)
  14. 14. Google Gemini Chat Model (AI layer) (connects to AI Agent)
  15. 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

Workflow steps

  1. 01

    Create and update detection

    Dual Google Drive triggers fetch both newly uploaded documents and revised files from the company folder.

  2. 02

    Document loading and splitting

    The default data loader and recursive character splitter break long company guides into structured text chunks.

  3. 03

    Gemini embeddings to Pinecone

    Google Gemini generates embeddings and writes the resulting vectors into your Pinecone index.

  4. 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

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.

Frequently asked

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.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

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

Chat on WhatsApp