Skip to main content

Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive

Workflow preview

Workflow preview
100%
Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive preview
Open on n8n.io

Important notice

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

1. Workflow Overview

️ How It Works: LocalRAG.AI ️ Note: This system only works for self hosted n8n instances. It will not function on n8n.cloud or other remote setups. LocalRAG.AI is a private, on prem AI assistant ...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatollama, @n8n/n8n-nodes-langchain.memorypostgreschat, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.lmollama, @n8n/n8n-nodes-langchain.embeddingsollama, @n8n/n8n-nodes-langchain.toolvectorstore

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive
Workflow name
Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive

⚙️ How It Works: LocalRAG.AI

⚠️ Note: This system only works for self-hosted n8n instances. It will not function on n8n.cloud or other remote setups. LocalRAG.AI is a private, on-prem AI assistant that uses your own documents to answer questions intelligently. It combines LangChain, Ollama, Qdrant, and Postgres into a powerful AI pipeline — all running locally for maximum data privacy.

🔄 What It Does

Monitors Your Google Drive Folders for new or updated files. Downloads the file, extracts the text, and prepares it. Generates Embeddings using your local Ollama model (e.g., LLaMA 3). Stores them in Qdrant, your local vector database. During a chat, it: Uses vector search to retrieve relevant chunks. Combines them with chat history stored in Postgres. Responds via a LangChain AI agent using your local model. 🛠️ Setup Steps (Self-hosted Only) Install and Self-host n8n (e.g., via Docker). Set up your Ollama instance locally and load your desired LLM (e.g., llama3). Deploy Qdrant locally for vector storage. Connect a Postgres DB to store chat history. Create and import the workflow in n8n. Authenticate Google Drive to monitor folders. Connect credentials for Ollama, Qdrant, Postgres in the n8n workflow. Start chatting through the Webhook Trigger or custom UI. 🧠 Perfect For: Research teams handling confidential data Internal documentation Q&A AI chatbots that don’t rely on OpenAI or cloud

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 - When chat message received

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

Block 2 - AI Agent

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

Block 3 - Ollama Chat Model

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

Block 4 - Postgres Chat Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryPostgresChat - memoryPostgresChat
Config choices
Version 1.3

Block 5 - Qdrant Vector Store

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

Block 6 - Ollama Model

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

Block 7 - Embeddings Ollama

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

Block 8 - Answer questions with a vector store

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

Block 9 - Sticky Note

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

Block 10 - Sticky Note1

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

Block 11 - File Created

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

Block 12 - File Updated

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

Block 13 - Set File ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Download File

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

Block 15 - Extract Document Text

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

Block 16 - Default Data Loader

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

Block 17 - Recursive Character Text Splitter

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

Block 18 - Embeddings Ollama1

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

Block 19 - Qdrant Vector Store Insert

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

Block 20 - Sticky Note4

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

3. Summary Table

Workflow Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive
Complexity advanced
Nodes 20
Categories Internal Wiki, AI RAG
Author David Olusola
Published 01 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5508/5508.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 Create a private document Q&A system with Llama3, Postgres, Qdrant and Google Drive do?

️ How It Works: LocalRAG.AI ️ Note: This system only works for self hosted n8n instances. It will not function on n8n.cloud or other remote setups. LocalRAG.AI is a private, on prem AI assistant ...

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.