RAG workflow for company documents stored in Google Drive
Workflow Description
An intelligent retrieval-augmented workflow that fetches company documents from Google Drive, segments them into manageable chunks, embeds them in Pinecone, and answers employee queries through a Gemini-powered AI agent with full context awareness.
How it works
- 1.Trigger the workflow when a user submits a question via chat interface or Google Drive
- 2.Retrieve and automatically load documents from the connected Google Drive folder
- 3.Segment text content into smaller chunks using recursive character splitting
- 4.Convert text chunks into vector embeddings using Gemini's embedding model
- 5.Query Pinecone vector store to find the most relevant document segments
- 6.Generate precise answers through an AI agent that combines retrieved context with Gemini's reasoning
Use cases
- Enable instant answers to employee questions about company policies, procedures, and internal documentation
- Reduce manual search time across thousands of files by automating document retrieval and relevance ranking
- Support knowledge management by providing a conversational interface to company documentation
Requirements
- Active access to company Google Drive with read permissions for target folders
- API keys configured for Gemini embeddings, Pinecone vector database, and Google Drive integration
- Company documents available in standard formats such as PDF, Word documents, or plain text files
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (18)
Pinecone Vector Store
Vector Store Pinecone
Embeddings Google Gemini
Gemini Model
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
AI Agent
Agent
Vector Store Tool
Tool Vector Store
Pinecone Vector Store (Retrieval)
Vector Store Pinecone
Embeddings Google Gemini (retrieval)
Gemini Model
Download File From Google Drive
Google Drive
Sticky Note2
Sticky Note
Google Drive File Updated
Google Drive Trigger
Google Drive File Created
Google Drive Trigger
Window Buffer Memory
Memory Buffer Window
When chat message received
Chat Trigger
Sticky Note
Sticky Note
Google Gemini Chat Model
Gemini Model
Google Gemini Chat Model (retrieval)
Gemini Model
Sticky Note1
Sticky Note