Templates / Answer Google Drive document questions with citations and OpenAI RAG

Answer Google Drive document questions with citations and OpenAI RAG

Ready for 3.0

by Jessy Mariau ✓ · 0 views · created 2026-11-22 · 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 37 nodes and runs when a chat message arrives (plus 3 other triggers). Along the way it connects Embeddings OpenAI, OpenAI Chat Model and Google Drive.

How it runs

Trigger: When a chat message arrives (plus 3 other triggers).

  1. Your Settings (Edit Fields (Set)): sets 10 fields: driveFolderId, similarityThreshold, stalenessMonths…
  2. Reset the file index after a restart (Data table): delete rows
  3. Create table rag_file_index (Data table): create (table)
  4. Route by trigger type (If): checks a condition and branches into true / false
  5. Create table rag_query_log (Data table): create (table)
  6. Did the message contain a question? (If): checks a condition and branches into true / false
  7. List files in the Drive folder (Google Drive): search (file folder)
  8. Create table rag_index_runs (Data table): create (table)
  9. Retrieve matching chunks (Simple Vector Store): searches the Simple vector store, with embeddings: Create embeddings for retrieval
  10. Reply to an empty message (Edit Fields (Set)): sets 1 field: replyText

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

Services it uses

Embeddings OpenAIOpenAI Chat ModelGoogle Drive

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (17)

From the author

Quick overview This workflow indexes files from a Google Drive folder into an in-memory vector store and answers questions in an n8n Chat using OpenAI, returning short answers with file citations and a staleness warning when the best source document is older…

Excerpt from Jessy Mariau'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.