Back to Templates

🧠 Build a Multi-Agent System with n8n, Qdrant, Gmail & OpenAI

Created by

Created by: Yulia || yulia

Yulia

Last update

Last update 5 hours ago

Share


This template presents a multi-agent system in which a coordinating agent manages specialized sub-agents: an AI agent for RAG and document summarization, and an email agent. Each agent effectively operates in its own domain, working collaboratively under the management of the primary agent.

In addition to the two sub-agents, the coordinator agent queries the latest news by calling the HTTPS Request Tool.

💡 This template is an extended version of the initial workflow on how to Build a RAG Agent with n8n, Qdrant & OpenAI.

The RAG sub-agent can use the same Qdrant collection. You can import this example collection (n8n-rag-2437367325990310-2025-11-04-10-41-54.snapshot) of 3 documents into the free Qdrant cloud or self-hosted account, rather than creating it from scratch.

🔗Example files for RAG

The template uses the following example files in the Google Docs format:

  1. German Data Protection law: Bundesdatenschutzgesetz (BDSG)
  2. Computer Security Incident Handling Guide (NIST.SP.800-61r2)
  3. Berkshire Hathaway letter to shareholders from 2024

🚀How to Get Started

  1. Copy or import the template to your n8n instance.
  2. Create your Google Drive credentials via the Google Cloud Console and add them to the "Get Document" node. A detailed walk-through can be found in the n8n docs.
  3. Create your Gmail credentials via the Google Cloud Console and add them to the Gmail nodes.
  4. Create a Qdrant API key and add it to the "Search Documents" node credentials. The API key will be displayed after you have logged into Qdrant and created a Cluster.
  5. Create or activate your OpenAI API key.
  6. Create or activate your OpenRouter API key.
  7. Create or activate your News API key.

💬Chat with the main Agent to query document data, search latest news or perform Email actions

1️⃣ Ask the agent about specific information, facts, quotes, or details that are stored in the uploaded documents.

E.g. What should be documented during incident response?

2️⃣ Ask the agent about recent news and current information from web sources.

E.g. What does BDSG say about data breaches and are there any recent cases?

3️⃣ Ask the agent to summarize the document or information related to the documents and email it to you.

E.g.I need a short summary of the Berkshire Hathaway letter, please send it to my email [[email protected]].

4️⃣ Aks the agent to update you on your recent emails.

E.g. I’d like to know the content of the latest email from [username].

5️⃣ Ask the agent to create a draft of the email.

E.g. Please create an email draft of the [document] summary.

🌟Adapt this template for your own use case

  • Enterprise workflows - Google Docs processing with automated communications
  • Research teams - Document analysis with automatic report distribution
  • Customer success - Intelligent document search with follow-up email automation
  • Content operations - Document summarization with stakeholder notifications
  • Compliance workflows - Policy queries with automated alert systems

⚠️ The current multi-agent architecture comes with certain trade-offs: the sequential nature of agent hand-offs can increase latency compared to single calls, and the full conversation history is not shared between all sub-agents.

💻 📞Get in touch if you want to customise this workflow or have any questions.