Build an advanced AI agent using n8n to combine real-time search (Perplexity), vector databases (Supabase), and structured data (Google Sheets). This n8n workflow leverages RAG and Cohere reranking.
Download this n8n workflow template and start using it instantly.
Automation specialists looking for advanced n8n templates.
Businesses needing an AI agent that accesses both internal (Supabase, Sheets) and external (web) data.
Developers interested in implementing complex RAG architectures within an n8n workflow.
Users aiming to leverage LangChain features within n8n, such as chat memory and reranking.
This advanced n8n workflow demonstrates how to construct a powerful AI agent that transcends single data source limitations. The core value of this n8n template lies in its ability to centralize knowledge retrieval using the MCP (Multi-Channel Protocol) pattern, allowing the agent to dynamically access real-time web search (via Perplexity), structured business data (via Google Sheets), and personalized, vectorized knowledge (stored in Supabase). Every component, from the initial n8n trigger to the final Cohere reranker n8n node, is designed for optimal performance and high-quality response generation. This specific n8n workflow ensures context retention via PostgreSQL memory, making conversations seamless and intelligent. Mastering this complex n8n workflow is key to deploying enterprise-grade conversational AI.
This comprehensive n8n workflow initiates when a user sends a message, triggering the process through a specialized n8n trigger node.
When chat message received n8n trigger starts the conversation, passing the query to the AI Agent n8n node.AI Agent utilizes the OpenAI Chat Model (likely GPT-4) and maintains state using the Postgres Chat Memory n8n node, ensuring conversation continuity.MCP Client knowledge tool.Knowledge MCP n8n trigger. This trigger acts as a unified endpoint for knowledge requests.Knowledge MCP simultaneously queries three distinct data sources:Real time web search (Perplexity tool).Tabular data (Google Sheets tool).Vectorized personal data (Supabase Vector Store).Embeddings OpenAI n8n node for vector generation and the Reranker Cohere n8n node for filtering and prioritizing the most relevant documents.AI Agent. The agent synthesizes this information using the OpenAI Chat Model to generate the final, contextualized response, which is then delivered back to the user via the initial n8n trigger.To deploy this powerful n8n workflow template, follow these steps:
Embeddings OpenAI and OpenAI Chat Model n8n node.Tabular data n8n node.Real time web search n8n node.Postgres Chat Memory to store chat history.Reranker Cohere n8n node.When chat message received n8n trigger and the Knowledge MCP n8n trigger will automatically generate webhooks upon activation. Ensure your n8n instance is publicly accessible if you plan to use this n8n workflow in a production environment.This complex n8n workflow utilizes several specialized LangChain-enabled n8n node types:
When chat message received (n8n trigger): This is the entry point. It captures incoming messages, typically from a chat client connected to n8n, and initiates the entire n8n workflow execution.
AI Agent (n8n node): The brain of the operation. It manages tool usage and reasoning. It is configured with the OpenAI LLM and the Postgres Chat Memory.
OpenAI Chat Model (n8n node): Serves as the primary Language Model for the AI Agent, responsible for generating responses based on the context provided.
Postgres Chat Memory (n8n node): Stores and retrieves previous messages, providing the necessary context for multi-turn conversations in this n8n template.
MCP Client knowledge (n8n node): Acts as a caller tool, designed to initiate a request to the centralized Knowledge MCP n8n trigger.
Knowledge MCP (n8n trigger): This serves as a sub-workflow endpoint. It receives the knowledge request and fans out the retrieval process to the various data sources (Supabase, Sheets, Perplexity).
Vectorized personal data (Supabase n8n node): Handles interaction with the Supabase vector store, retrieving internal documents or data based on semantic similarity. It is configured to use the Cohere reranker and OpenAI embeddings.
Reranker Cohere (n8n node): A crucial step in RAG, this n8n node refines the results retrieved from Supabase, ensuring only the most relevant documents are passed back to the AI agent, significantly improving answer quality.
Tabular data (Google Sheets n8n node): Provides the agent with access to structured data stored in a specified Google Sheet, functioning as a tool for specific queries like pricing or status checks.
Real time web search (Perplexity n8n node): Allows the AI Agent to query the internet for up-to-the-minute information, overcoming the LLM's knowledge cutoff. This is a powerful n8n node for real-time applications.
Use this comprehensive n8n workflow to build a sophisticated AI movie recommendation chatbot on WhatsApp. Integrates Ollama, TMDb, and Watchmode for real-time recommendations and streaming availability.

Track and visualize large language model (LLM) usage metrics, tokens, and costs using this powerful n8n workflow. Generate an interactive HTML dashboard for real-time AI monitoring.

Use this advanced n8n workflow template to automatically generate professional, structured HTML case studies using an OpenAI GPT model, and host the output on AWS S3 or convert it to PDF via n8n.

Deploy a multi-agent n8n workflow using OpenAI and Perplexity to automate 24/7 news research, article drafting, editing, and newsletter delivery. This complex n8n template manages a full AI team.

Automate newsletter creation using this advanced n8n workflow. Crawl websites with Dumpling AI, summarize content, and generate HTML emails using GPT-4o, delivered automatically via Gmail.

Automation expert & n8n power user. I build advanced workflows combining AI, outbound, and business logic. Grab my templates or reach out for custom builds.







































