Skip to main content

Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG

Workflow preview

Workflow preview
100%
Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Overview This template allows users to set up an AI powered chatbot that retrieves and processes knowledge from Google Drive documents using Retrieval Augmented Generation (RAG). By leveraging Llam...

Best for

  • Internal Wiki automation workflows
  • AI RAG automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.embeddingsollama, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.chattrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mohsin.

Original n8n.io source

1.1 Workflow description

Title
Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG
Workflow name
Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG

Overview This template allows users to set up an AI-powered chatbot that retrieves and processes knowledge from Google Drive documents using Retrieval-Augmented Generation (RAG). By leveraging Llama 3 for natural language responses and Qdrant vector storage for document embeddings, this chatbot provides accurate, context-aware answers based on stored files.

Problem It Solves Standard AI chatbots often rely on predefined models with limited real-time knowledge access. This workflow overcomes that limitation by:

Automatically fetching new documents from Google Drive.

Embedding knowledge for fast retrieval using Qdrant.

Generating human-like responses with Llama 3 AI.

Providing accurate, source-backed answers in conversations.

Use Cases ✔️ Customer Support – Retrieve and summarize FAQs stored in Google Drive. ✔️ Internal Knowledge Base – Automate document-based query responses. ✔️ AI-powered Research Assistant – Search and generate insights from uploaded files. ✔️ Business Automation – Enhance workflows with document-aware chat interactions.

Setup Instructions 1️⃣ Google Drive Trigger: Detect & Fetch New Documents Watches for new files added to a specific Google Drive folder.

Retrieves the latest file metadata and passes it into the workflow.

2️⃣ Processing & Embedding the Document The document is downloaded via the Google Drive node.

Text data is split into smaller, retrievable chunks using Recursive Text Splitter.

Embeddings are created using Ollama’s Nomic-Embed Model.

Knowledge is stored in Qdrant Vector Database for fast AI-powered lookup.

3️⃣ AI Chatbot & Query Handling The Chat Trigger node listens for user queries.

The AI Agent retrieves context-aware answers by searching Qdrant’s vectorized documents.

The Llama 3 Model generates human-like responses based on stored knowledge.

Detailed Workflow Explanation 🔹 Google Drive Trigger ✅ Monitors a specific folder for new documents. ✅ Automatically fetches document metadata when a file is uploaded.

🔹 Qdrant Vector Store ✅ Stores embedded document text, making retrieval instant & accurate. ✅ Allows the chatbot to reference stored knowledge dynamically.

🔹 Recursive Text Splitter ✅ Splits long documents into manageable chunks for efficient embedding. ✅ Improves chatbot response accuracy by organizing document data.

🔹 Llama 3 Chat Model ✅ Generates natural, human-like replies using AI. ✅ Uses retrieved document data for context-aware responses.

Customization Options 🔹 Adjust polling frequency for document updates. 🔹 Expand knowledge base by adding more storage sources. 🔹 Refine chatbot responses with prompt tuning in Llama 3.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Google Drive Trigger

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 2 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 3 - Embeddings Ollama

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOllama - embeddingsOllama
Config choices
Version 1

Block 4 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 5 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 6 - Qdrant Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1.1

Block 7 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 8 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 9 - Ollama Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOllama - lmChatOllama
Config choices
Version 1

Block 10 - Qdrant Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1.1

Block 11 - Embeddings Ollama1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOllama - embeddingsOllama
Config choices
Version 1

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG
Complexity intermediate
Nodes 12
Categories Internal Wiki, AI RAG
Author Mohsin
Published 08 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4773/4773.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a document-based AI chatbot with Google Drive, Llama 3, and Qdrant RAG do?

Overview This template allows users to set up an AI powered chatbot that retrieves and processes knowledge from Google Drive documents using Retrieval Augmented Generation (RAG). By leveraging Llam...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.