RAG with andOpenAI
Workflow Description
Advanced template combining Retrieval-Augmented Generation (RAG) with OpenAI services to build an intelligent agent that processes documents from Google Drive, understands them through embedding models, and answers queries accurately while maintaining conversation history.
How it works
- 1.Activate manual trigger or receive webhook request to initiate the workflow
- 2.Extract documents from Google Drive and process them using the default data loader
- 3.Segment documents into manageable chunks with the token-based text splitter
- 4.Embed chunks via OpenAI models and store them in Qdrant vector database
- 5.Run OpenAI agent using vector store as a retrieval tool for contextual search
- 6.Respond to user queries based on retrieved context while preserving chat memory
Use cases
- Question-answering system built on internal company documents and knowledge bases
- Intelligent assistant that understands multiple cloud-stored files and answers queries with precise context
- Advanced semantic search application that retrieves by meaning rather than keywords
- Interactive report generator that converses with users to extract required information
Requirements
- Valid OpenAI API key for GPT models and embedding services
- Proper Google Drive access credentials with file read permissions
- Configured Qdrant server ready to receive, store, and search vector embeddings
- Basic understanding of RAG mechanisms and large-scale text data processing
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 (23)
AI Agent
Agent
Vector Store Tool
Tool Vector Store
Qdrant Vector Store
Vector Store Qdrant
Embeddings OpenAI
OpenAI
Sticky Note4
Sticky Note
Sticky Note
Sticky Note
When clicking ‘Test workflow’
Manual Trigger
Create collection
HTTP Request
Refresh collection
HTTP Request
Get folder
Google Drive
Download Files
Google Drive
Default Data Loader
Document Default Data Loader
Token Splitter
Text Splitter Token Splitter
Sticky Note3
Sticky Note
Qdrant Vector Store1
Vector Store Qdrant
Embeddings OpenAI1
OpenAI
Sticky Note5
Sticky Note
Respond to ElevenLabs
Webhook
OpenAI
OpenAI
Listen
Webhook
Window Buffer Memory
Memory Buffer Window
OpenAI Chat Model
OpenAI
Sticky Note6
Sticky Note