Skip to main content

Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI

Workflow preview

Workflow preview
100%
Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI preview
Open on n8n.io

Important notice

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

1. Workflow Overview

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...

Best for

  • Document Extraction automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.toolworkflow, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.googledrive, n8n-nodes-base.extractfromfile, n8n-nodes-base.markdown, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI
Workflow name
Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI

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.

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 - Search Documents

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

Block 2 - Summarize Document

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.2

Block 3 - Receive Summary Request

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 4 - Get Document

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

Block 5 - Extract Content

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

Block 6 - Convert to Markdown

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

Block 7 - Process Request

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 8 - Generate Summary

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 9 - Format Summary Output

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

Block 10 - Generate Embeddings

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 11 - RAG sub-agent

Type / Role
@n8n/n8n-nodes-langchain.agentTool - agentTool
Config choices
Version 2.2

Block 12 - Gmail sub-agent

Type / Role
@n8n/n8n-nodes-langchain.agentTool - agentTool
Config choices
Version 2.2

Block 13 - Get multiple messages in Gmail

Type / Role
n8n-nodes-base.gmailTool - gmailTool
Config choices
Version 2.1

Block 14 - Read a message in Gmail

Type / Role
n8n-nodes-base.gmailTool - gmailTool
Config choices
Version 2.1

Block 15 - Send a message in Gmail

Type / Role
n8n-nodes-base.gmailTool - gmailTool
Config choices
Version 2.1

Block 16 - Create a draft in Gmail

Type / Role
n8n-nodes-base.gmailTool - gmailTool
Config choices
Version 2.1

Block 17 - Answer Questions

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

Block 18 - Generate Agent Response

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 19 - Store Conversation with an Agent

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

Block 20 - Generate RAG sub-agent Response

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 21 - Check News or Recent Data

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 22 - Generate Gmail sub-agent Response

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

Block 23 - Sticky Note1

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

Block 24 - Sticky Note2

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

Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI
Complexity advanced
Nodes 29
Categories Document Extraction, AI Chatbot
Author Yulia
Published 05 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11525/11525.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 Build a multi-agent system with n8n, Qdrant, Gmail & OpenAI do?

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...

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 Document Extraction, AI Chatbot use case.