Google Drive RAG chatbot workflow in n8n
An n8n community template indexes Google Drive documents in Qdrant and answers questions with Gemini. You have to set the Drive folder and the connections yourself.
The n8n template AI Powered RAG Chatbot for Your Docs + Google Drive + Gemini + Qdrant turns a static document repository into a searchable, conversational knowledge base. It is one of the most visited templates in my roundup of popular n8n workflows.
Document silos in Google Drive
Google Drive and other storage hold folders of PDFs, Word documents, text files and spreadsheets. The information is valuable, but finding answers across hundreds of files is slow and frustrating. How do you make that knowledge queryable and conversational? Retrieval Augmented Generation (RAG) makes that possible, and I covered the topic in "Do million-token context windows replace RAG?".
How it works
The workflow runs a RAG pipeline in three stages.
-
Document processing and storage
- The workflow retrieves documents from a Google Drive folder you specify.
- It then splits these documents into chunks optimized for AI understanding.
- AI extracts key metadata from your documents. That goes beyond file names and captures what the content says, which enables context-aware search.
- The chunks and their metadata become vectors, stored in a Qdrant vector database. Qdrant suits this well, because it offers efficient similarity search, which is the heart of RAG.
-
Intelligent chat interface
- Once the knowledge base is built, the workflow provides a conversational interface powered by Google's Gemini AI. Users ask questions in natural language.
- For each query, the RAG step retrieves the most relevant document chunks from Qdrant.
- Gemini receives those chunks with the original question and generates accurate, context-aware responses grounded in your documents.
- The workflow also keeps a chat history in Google Docs for easy reference.
-
Vector store management
- The workflow deletes documents from the Qdrant vector store, and it asks for human verification through Telegram notifications first. That prevents accidental data loss.
- It supports batch processing, which makes it easier to onboard large volumes of documents.
The tools and their roles
The workflow combines four tools that fit into any AI development power stack.
- n8n orchestrates the workflow, connects the services and manages the logic flow. It is an example of orchestrating complex AI systems with n8n.
- Google Drive is a familiar place to store source documents.
- Google Gemini provides natural language understanding and generation for the chatbot and for metadata extraction.
- Qdrant is a high-performance, open-source vector database for storing and searching the embeddings from your documents.
Setting up the template
The template makes setup manageable. The key steps are:
- Set up credentials for Google Drive and Docs, the Gemini AI API, your Qdrant vector store and a Telegram bot for notifications. The template also includes a node for deleting Qdrant points, which requires an OpenAI API key for its embedding model used in the LangChainJS-based deletion logic.
- Specify your Google Drive folder ID and the Qdrant collection name.
- The workflow guides you through verifying each part of the process.
Why the template is popular
The popularity of this template likely comes from a few factors:
- It solves a high-value problem. Making internal documentation easy to query helps productivity and decision-making.
- It integrates models like Gemini, which power the chatbot's answers.
- It is a clear, working example of a RAG pipeline, a topic that gets plenty of attention in AI.
- It shows what n8n can do. The workflow builds a multi-step AI application, in line with an AI-first approach to building solutions.
The template is on n8n.io. If you want help building one like it for your team, get in touch.