Multi-Agent AI Chatbot with RAG and Booking Tools - n8n Workflow

Implement a robust, modular n8n workflow for your website chatbot. This automation uses specialized n8n tools (RAG, Calendar, Ticketing) powered by an OpenAI n8n node to handle customer inquiries, booking, and support tickets efficiently.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Companies seeking to deploy an advanced, conversational AI chatbot on their website without extensive coding.

  • n8n users who want to build complex, tool-based agents using LangChain integration.

  • Support teams looking to automate FAQ responses (RAG) and meeting scheduling.

  • Developers needing a scalable n8n template for managing multiple LLM sub-agents.

Overview

This n8n workflow solves the common challenge of building a robust chatbot that requires diverse functionalities. Instead of relying on a single, overly complex prompt, this solution employs a 'Manager Agent' architecture. The main agent receives the user's query and intelligently decides which specialized sub-agent (or n8n workflow tool) should handle the request—be it answering an FAQ (RAG), checking availability (Calendar), or escalating to a human (Ticketing).

This modular approach, built entirely within an n8n workflow, ensures cleaner logic, easier maintenance, and better performance by minimizing context switching and reducing the risk of the LLM hallucinating. By using this n8n template, businesses can offer instant, accurate support while ensuring critical tasks like scheduling and ticketing are handled reliably.

How it Works

The entire process is orchestrated by a specialized n8n node architecture:


  1. Trigger: The automation starts with the When chat message received n8n trigger. This trigger exposes a webhook endpoint, typically connected to a website chat widget, initiating the n8n workflow upon receiving a user message.

  2. Agent Initialization: The input flows into the Ultimate Website Chatbot Agent (a LangChain Agent n8n node). This agent is configured with detailed instructions (persona, goals, and rules of engagement).

  3. Memory: A Simple Memory n8n node is connected to the agent, providing a short-term context window (10 messages) to maintain conversational history and coherence within the current user session.

  4. LLM Backend: The agent uses the OpenAI Chat Model n8n node (specifically gpt-4o-mini) as its reasoning engine.

  5. Tool Orchestration: Based on the user's request, the Manager Agent evaluates the three available tools (specialized n8n workflow nodes):

If the user asks a question about the company, the agent invokes the RAGagent tool.
If the user requests a meeting or consultation, the agent uses the calendarAgent tool, adhering to the complex booking logic defined in the system prompt.
* If the request is unsolvable, the RAG agent fails, or the user asks for a human, the agent routes the request to the ticketAgent n8n node for escalation, collecting necessary user details first.

  1. Response: The agent returns the output generated by the selected tool or its own response (if appropriate) back to the user via the initial n8n trigger.

Installation Guide

To set up this powerful multi-agent n8n workflow:


  1. Import the n8n template: Copy the provided JSON and import it into your n8n instance via the Workflows section (New > Import from JSON).

  2. OpenAI Credentials: Locate the OpenAI Chat Model n8n node and configure your OpenAI API key credentials. This is essential for the reasoning layer of the workflow.

  3. Sub-Agent Setup: This n8n workflow relies on three linked sub-workflows (RAG Agent, Calendar Agent, Ticket Agent). You must ensure these three referenced workflows exist and are active in your n8n instance, and that the toolWorkflow n8n node references the correct IDs.

  4. Connect Tools: Configure the internal logic and credentials for the sub-agents (e.g., connect the RAG Agent to your vector database, and the Calendar Agent to Google Calendar).

  5. Activate Trigger: The When chat message received n8n trigger is the entry point. Activate the main workflow and retrieve the public webhook URL. This URL must be integrated into your website's custom chat frontend to start using the automation.

Node Details

When chat message received (n8n trigger): This is the entry point, starting the n8n workflow upon receiving a message from an external chat interface. It acts as the primary n8n trigger for the entire system.
Ultimate Website Chatbot Agent (LangChain Agent n8n node): The core intelligence engine. It contains detailed system instructions, defining its role (Dan Bot) and strictly enforcing the use of tools for all actions (FAQs, scheduling, escalation).
OpenAI Chat Model (n8n node): Provides the language model backend, configured to use gpt-4o-mini for efficient and accurate decision-making within the n8n workflow.
Simple Memory (Memory Buffer Window n8n node): Maintains the conversation context across multiple turns with a window length of 10, ensuring the agent remembers recent interactions.
RAGagent (Workflow Tool n8n node): A specialized sub-agent tool designated for Retrieval Augmented Generation. It is called by the Manager Agent to answer FAQs by querying an external knowledge base (referenced by the linked n8n workflow ID).
calendarAgent (Workflow Tool n8n node): A specialized sub-agent tool used exclusively for calendar actions, including checking availability and booking consultations, leveraging a separate n8n workflow for complex scheduling logic.


  • ticketAgent (Workflow Tool n8n node): A specialized sub-agent tool used for human hand-off. It collects necessary user information and creates a support ticket via a separate, linked n8n workflow.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

Hey 👋 I'm Abdul. I build AI-powered systems for marketing agencies and consultants who want to move fast and automate the boring stuff. Think lead gen agents, proposal generators, and content creation systems. I specialize in growth-focused automations and share workflows that save time and land clients.

Featured*