Intelligent chatbot with RAG for Google Drive documents
Workflow Description
Build an AI agent that retrieves information from Google Drive files and answers user questions via Telegram or X, maintaining conversation history in memory for continuous context.
How it works
- 1.Load documents from Google Drive and split them into smaller text chunks
- 2.Convert text to vector embeddings and store in a vector database
- 3.Process user messages from Telegram or X and route them to the AI agent
- 4.Search stored documents and retrieve relevant answers
- 5.Send AI-generated responses via Gemini or OpenAI back to the user
Use cases
- Answer employee questions about company policies and stored files
- Provide self-service technical support based on product knowledge base
- Automatically extract information from contracts and client reports
Requirements
- Google Drive account containing documents to search
- API keys from OpenAI and/or Google Gemini
- Telegram or X (Twitter) account for user communication
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