Templates / Automate Document Q&A with Multi-Agent RAG Orchestration using Contextual AI & Gemini

Automate Document Q&A with Multi-Agent RAG Orchestration using Contextual AI & Gemini

Unknown

by Jinash Rouniyar ✓ · 3,136 views · created 2025-12-09 · Internal Wiki, AI RAG

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 14 nodes and runs when someone submits an n8n form (“Create your AI Agent”) (plus 1 other trigger). Along the way it connects Google Gemini Chat Model and Contextualai (community).

How it runs

Trigger: When someone submits an n8n form (“Create your AI Agent”) (plus 1 other trigger).

  1. Preprocessing Step (Code): runs custom JavaScript code
  2. Agent Orchestrator (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 2 tools (List Agents Tool, Query Agent Tool); memory: Simple Memory
  3. Create Agent (Contextual Ai): uses Contextual Ai
  4. Split Out: splits a list into separate items
  5. Iterate over each files (Loop Over Items (Split in Batches)): loops over the items in batches
  6. Wait: waits 30 seconds
  7. Get Document Ingestion Status (Contextual Ai): get document metadata (datastore)
  8. If: checks a condition and branches into true / false

Services it uses

Google Gemini Chat ModelContextualai (community)

Before you upgrade to n8n 3.0

We can't fully verify this one: it relies on 2 community packages, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

  • Check that n8n-nodes-contextualai is verified or supports 3.0 (used in Create Agent, Get Document Ingestion Status).
  • Check that n8n-nodes-contextualai is verified or supports 3.0 (used in Query Agent Tool, List Agents Tool).

Nodes used (12)

From the author

PROBLEM Managing multiple RAG AI agents can be complex when each has its own purpose and vector database. - Manually tracking agents and deciding which one to query wastes time. - LLMs often struggle to determine which agent best fits a user’s request. This…

Excerpt from Jinash Rouniyar'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.