Templates / Build a RAG system with automatic citations using Qdrant, Gemini & OpenAI

Build a RAG system with automatic citations using Qdrant, Gemini & OpenAI

Ready for 3.0

by Davide Boizza ✓ · 3,437 views · created 2025-06-18 · Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 24 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Embeddings OpenAI, Qdrant Vector Store, Google Gemini Chat Model and Google Drive. It also calls qdranturl over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Clear collection (HTTP Request): calls an HTTP API (POST)
  2. chatInput (Edit Fields (Set)): sets 1 field: chatInput
  3. Get folder (Google Drive): work with file folder
  4. Question and Answer Chain: answers questions over your documents (RAG), with model: Google Gemini Chat Model; retriever: Vector Store Retriever
  5. Retrive sources (Qdrant Vector Store): searches the Qdrant vector store, with embeddings: Embeddings OpenAI
  6. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  7. Merge: merges the data from its input branches
  8. Aggregate: combines items into one
  9. Get file (Google Drive): download
  10. Response (Code): runs custom JavaScript code

…plus 4 more steps. See the full node list below.

Services it uses

Embeddings OpenAIQdrant Vector StoreGoogle Gemini Chat ModelGoogle Drive

HTTP calls to: qdranturl

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (17)

From the author

This workflow implements a Retrieval-Augmented Generation (RAG) system that: Stores vectorized documents in Qdrant, Retrieves relevant content based on user input, Generates AI answers using Google Gemini, Automatically cites the document sources (from Google…

Excerpt from Davide Boizza's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.