Build an AI-Powered RAG Chatbot with Google Drive & Gemini

Discover how to automate document processing and enable intelligent chat interactions using N8N’s workflow integrating Google Drive, Qdrant vector storage, and Google Gemini AI. This workflow solves the complex problem of managing and querying large document collections effortlessly.
manualTrigger
googleDrive
vectorStoreQdrant
+19
Workflow Identifier: 1037
NODES in Use: manualTrigger, set, googleDrive, extractFromFile, informationExtractor, textSplitterTokenSplitter, documentDefaultDataLoader, embeddingsOpenAi, vectorStoreQdrant, wait, splitInBatches, merge, telegram, code, lmChatGoogleGemini, lmChatOpenAi, chatTrigger, memoryBufferWindow, agent, googleDocs, summarize, stickyNote
Automate AI RAG chatbot with n8n and Google Drive

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow helps users find information fast from many Google Drive documents. It reads files, breaks them into pieces, and searches their content by using artificial intelligence. Users can chat with an AI assistant that knows the documents and gets answers quickly. This saves lots of time and avoids missing important info.

The workflow connects Google Drive, Qdrant vector database, and Google Gemini AI to build a chat system that answers questions based on real document data.


Who should use this workflow

This is useful for people who have many documents stored in Google Drive. If manual searching for info takes too long or causes mistakes, this workflow can speed things up. It fits managers, researchers, or support teams needing quick facts from many files.


Tools and services used

  • Google Drive API: To get files and their content from a folder.
  • OpenAI text-embedding-3-large model: To create semantic vectors of document text.
  • Qdrant vector store: To save vectors for fast similarity search.
  • Google Gemini Chat Model: To handle chat with users and generate answers.
  • Telegram Bot API: To send notifications and get approval before deleting data.
  • N8N automation platform: To connect and run all these steps in order.

Inputs → Processing → Output

Input

  • Google Drive folder ID with the documents to read.
  • API keys for Google Drive, Qdrant, OpenAI, Google Gemini, and Telegram.

Processing steps

  • Fetch all files and download content from the Google Drive folder.
  • Extract text from files and use AI to get metadata like topics and keywords.
  • Split big documents into smaller chunks for embedding.
  • Create semantic embeddings with OpenAI text-embedding-3-large model.
  • Save these embeddings with metadata into Qdrant vector database.
  • Set up a chat system with Google Gemini AI that uses Qdrant search results and conversation history.
  • Save chat history to Google Docs automatically.
  • Send Telegram messages to ask for confirmation before deleting indexed data.
  • Delete vectors from Qdrant only if user approves via Telegram.

Output

  • Fast, context-aware answers to user questions based on Google Drive documents.
  • Organized chat history stored in Google Docs.
  • Notifications sent when data is updated or deleted.

Beginner step-by-step: How to use this workflow in n8n

Step 1: Import the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open your active n8n editor.
  3. Use the “Import from File” option to load the downloaded workflow.

Step 2: Add credentials and settings

  1. Open each node that require credentials (Google Drive, OpenAI, Qdrant, Google Gemini, Telegram) and add your API keys or OAuth info.
  2. Set the Google Drive folder ID in the Google Folder ID node. Double check the folder permissions.
  3. Update the Qdrant collection name if needed in the Data Loader node.
  4. Edit the Telegram chat ID or channel if you want notifications in a different place.

Step 3: Test the workflow

  1. Trigger the workflow using manual trigger or by sending a chat message to the configured bot.
  2. Watch the execution to confirm files are fetched, processed, and chat replies happen.

Step 4: Activate for production

  1. Turn the workflow status from inactive to active.
  2. Optionally, set up regular scheduled triggers to keep document data synced automatically.
  3. Monitor Telegram notifications for status updates or deletion approval.
  4. For running n8n on your own server, consider self-host n8n options.

Customization ideas

  • Change the Google Drive folder ID to index different files.
  • Modify chunk size in Token Splitter if documents are very large or short.
  • Replace text embedding model with others from OpenAI or Hugging Face.
  • Switch the Google Gemini chat model to another conversational AI, and tweak temperature settings.
  • Edit the AI system prompt in Extract Meta Data node to extract other metadata features.

Common problems and fixes

  • Google Drive folder not accessible: Check if folder ID is correct and the OAuth setup has permission.
  • Qdrant upsert fails: Verify Qdrant API key and network. Add delays if requests hit rate limits.
  • Chatbot answers irrelevant: Make sure documents are fully indexed and embeddings saved properly in Qdrant.

Summary and results

✓ Chat with an AI assistant that knows your Google Drive documents well.

✓ Save hours by automating manual document search and summary.

✓ Keep conversation history safely stored in Google Docs.

✓ Control data deletion securely through Telegram approvals.

→ Turn many scattered documents into a smart, quick query system inside n8n.


Automate AI RAG chatbot with n8n and Google Drive

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

It uses the Google Drive API with the folder ID to list and download all files from that folder.
Qdrant stores semantic embeddings of document text chunks to enable fast similarity search for chat queries.
Chat conversations are automatically appended to a Google Docs document for record keeping.
The workflow sends a double confirmation request via Telegram and only deletes data if the user approves.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.