Build an intelligent assistant for Google Drive document queries
Workflow Description
An automation that transforms Google Drive documents into a searchable knowledge base using RAG technology, where an AI assistant answers user questions via Telegram and other apps based on stored file content.
How it works
- 1.Load documents from Google Drive and split them into processable text chunks
- 2.Convert text into numerical vectors and store them in a vector database (Qdrant)
- 3.Receive a user question via Telegram or chat interface and route it to the AI assistant
- 4.Search for the most relevant passages from the knowledge base and generate an answer using Gemini or OpenAI models
- 5.Send the response directly to the user while maintaining conversation context for follow-up questions
Use cases
- Enterprise assistant that answers employee questions about company policies and procedures from stored documents
- Customer support bot that provides instant answers based on knowledge base and documentation
- Smart search application for lawyers and consultants to find relevant information in contracts and documents
- Internal documentation system that answers technical questions from development teams based on guides and reports
Requirements
- Google Drive account containing the documents to be searched
- API keys for OpenAI and/or Google Gemini
- Active Telegram account (optional for bot integration)
- n8n platform with ability to run long-running processes
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 (50)
Data Loader
Document Default Data Loader
Token Splitter
Text Splitter Token Splitter
Qdrant Vector Store
Vector Store Qdrant
Loop Over Items
Split In Batches
Wait
Wait
When clicking ‘Test workflow’
Manual Trigger
Google Gemini Chat Model
Gemini Model
Merge
Merge
Extract Meta Data
Information Extractor
Get File Contents
Extract From File
Download File From Google Drive
Google Drive
Find File Ids in Google Drive Folder
Google Drive
text-embeddings-3-large
OpenAI
Google Folder ID
Set
gpt-4o-mini1
OpenAI
Delete Qdrant Points by File ID
Code
Qdrant Collection Name
Set
File Id List
Summarize
Merge1
Merge
Merge2
Merge
Sticky Note
Sticky Note
Confirm Qdrant Delete Points
Set
If
If
Sticky Note1
Sticky Note
Send Declined Message
Set
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Webhook
Webhook
AI Agent
Agent
Window Buffer Memory
Memory Buffer Window
When chat message received
Chat Trigger
Google Gemini Chat Model1
Gemini Model
text-embeddings-3-large1
OpenAI
Sticky Note9
Sticky Note
Sticky Note10
Sticky Note
Sticky Note11
Sticky Note
Sticky Note12
Sticky Note
Google Drive
Google Drive
Respond to User
Set
Sticky Note13
Sticky Note
Update Chat History
Google Docs
Qdrant Vector Store Tool
Vector Store Qdrant
OpenAI Chat Model
OpenAI
Send Completed Message
Set
Sticky Note14
Sticky Note