Build a RAG agent with n8n, Qdrant & OpenAI
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Google Drive, Qdrant Vector Store, Embeddings OpenAI and OpenAI Chat Model.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- Answer Questions (AI Agent): runs an AI agent, with model: Generate Response; 1 tool (Search Documents); memory: Store Conversation
- Download as Markdown (HTTP Request): calls an HTTP API
- Add Metadata (Merge): merges the data from its input branches
- Insert into Vector Store (Qdrant Vector Store): stores documents in the Qdrant vector store, with embeddings: Generate Embeddings; document loader: Load File Content & Metadata
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
From the author
This template helps you to create an intelligent document assistant that can answer questions from uploaded files. It shows a complete single-vector RAG (Retrieval-Augmented Generation) system that automatically processes documents, lets you chat with it in…