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 natural language and provides accurate, source-cited responses.
The workflow consists of two parts: the data loading pipeline and RAG AI Agent that answers your questions based on the uploaded documents.
To test tis workflow, you can use the following example files in a shared Google Drive folder.
đĄ Find more information on creating RAG AI agents in n8n on the official page.
The template uses the following example files in the Google Docs format:
â Upload files to Google Drive.
IMPORTANT: This template supports files in Google Docs format. New files will be downloaded in HTML format and converted to Markdown. This preserves the overall document structure and improves the quality of responses.
The webhook will catch the added files and you will see the execution in your "Executions" tab.
Note: If the webhook doesnât see the files you copied, try adding them to your Google Drive folder from the opened shared files via the Move to feature.
â Chunk, embed, and store your data with a connected OpenAI embedding model and Qdrant vector store.
A Qdrant collection â vector storage for your data â will be created automatically after the n8n webhook has caught your data from Google Drive. You can name your collection in the "Insert into Vector Store" node.
â Select the database with imported data in the âSearch Documentsâ sub-node of an AI Agent.
â Start a chat with your agent via the chat interface: it will retrieve data from the vector store and provide a response.
âYou can ask the following questions based on the example files to test this workflow:
The workflow automatically detects new files, processes them into searchable vector chunks, and maintains conversation context. Just drop files in your Google Drive folder and start asking questions.
đ» đGet in touch with me if you want to customise this workflow or have any questions.