RAG workflow for company documents stored in Google Drive
Workflow Description
A retrieval-augmented generation (RAG) workflow that extracts documents from Google Drive, segments them, converts them to embeddings via Gemini, stores them in Pinecone, and answers employee queries based on actual company content.
How it works
- 1.Automatically fetch documents from Google Drive when triggered
- 2.Split lengthy texts into processable chunks using recursive character splitting
- 3.Convert chunks into vector embeddings using Gemini's embedding model
- 4.Store vectors in Pinecone for efficient semantic search
- 5.Answer user questions by matching queries against indexed company documents
- 6.Maintain conversation context through the memory buffer window
Use cases
- Enable employees to find answers about company policies and procedures instantly
- Improve discoverability and accuracy of internal knowledge base searches
Requirements
- Valid Google Drive connection with access permissions to required folders
- Configured Gemini API key and initialized Pinecone vector database
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