Build a powerful, context-aware chatbot using this advanced n8n workflow. Integrates Claude (Anthropic), Supabase Vector Store, and Postgres chat memory for RAG capabilities.
Download this n8n workflow template and start using it instantly.
Developers and Integrators: Those looking to deploy advanced, customized AI agents rapidly.
Businesses needing RAG: Organizations requiring a chatbot that answers questions based on specific, internal knowledge bases or documentation.
Automation Specialists: Users interested in leveraging the power of n8n templates for complex language model operations.
n8n Users: Individuals who need to implement conversation memory and specialized tools within a core n8n workflow.
This sophisticated n8n workflow provides a robust solution for building custom, knowledge-powered chatbots capable of Retrieval-Augmented Generation (RAG). Unlike simple conversational AIs, this specific n8n template integrates seamlessly with external vector databases (Supabase) and internal storage (Postgres) to maintain context and ensure high-accuracy responses based on your proprietary documentation.
The core value is the creation of a powerful AI Agent that uses multiple specialized tools (memory and vector store), orchestrated entirely by n8n. The setup utilizes an initial chat n8n trigger, followed by the AI Agent n8n node which delegates tasks, resulting in an enterprise-ready conversational system. This comprehensive n8n workflow eliminates the need for managing complex infrastructure outside of n8n.
This powerful n8n workflow initiates when a message is received via the When chat message received n8n trigger. This action immediately kicks off the flow:
When chat message received n8n trigger captures the incoming user query, enabling the execution of the entire sequence.AI Agent n8n node. This central controller evaluates the user's intent.Anthropic Chat Model (Claude Sonnet 4) to understand the query and formulate a response.Postgres Chat Memory n8n node. This memory tool maintains a history of the last 20 messages, ensuring the response is contextually relevant across the conversation session—a key feature of this n8n workflow.Supabase Vector Store n8n node (configured as a tool). This tool performs a semantic search against the specified knowledge base table (growthaidocuments).Embeddings OpenAI n8n node, which translates the user query into vectors for similarity matching.To deploy this specialized n8n workflow, follow these steps:
Anthropic Chat Model n8n node with your Anthropic API key.Embeddings OpenAI n8n node. This is crucial for vectorizing queries for the RAG functionality.Postgres Chat Memory n8n node utilizes n8n's built-in PostgreSQL instance for memory. Ensure this internal connection is active.Supabase Vector Store n8n node with your Supabase API URL and Service Role Key. Ensure the table name specified (growthaidocuments) matches your actual vectorized knowledge base table.When chat message received n8n trigger to make the chatbot live.This robust n8n workflow is now ready to handle incoming chat messages with deep contextual awareness.
When chat message received (n8n trigger):
Function: Serves as the starting point for this n8n workflow, listening for incoming chat queries. It provides a standard interface for connecting external chat platforms via webhooks.
Key Configuration: Setup as a basic chat n8n trigger.
AI Agent (n8n node):
Function: The core decision-making unit. It orchestrates the flow, choosing which connected tools (memory, knowledge base) to use before generating the final response using the language model.
Key Configuration: System Message: "You are a helpful assistant".
Anthropic Chat Model (n8n node):
Function: Provides the LLM capabilities, processing input and generating coherent text. It acts as the brain of the n8n workflow.
Key Configuration: Model selected is claude-sonnet-4-20250514.
Postgres Chat Memory (n8n node):
Function: Maintains conversation state, allowing the agent to remember previous exchanges. Essential for context in any long-running n8n workflow.
Key Configuration: Context Window Length set to 20 messages.
Supabase Vector Store (n8n node):
Function: Acts as a specialized tool for the AI Agent, providing access to the custom knowledge base stored in Supabase for RAG.
Key Configuration: Mode: retrieve-as-tool; Table Name: growthaidocuments; Tool Description: Database.
Embeddings OpenAI (n8n node):
* Function: Converts text (user queries) into numerical vectors (embeddings), enabling the Supabase Vector Store n8n node to perform efficient semantic searches for the knowledge retrieval step.
Build a powerful RAG chatbot using an n8n workflow combining OpenAI, Notion database tools, and conversational memory. Use this n8n template for fast deployment of AI knowledge agents.

Build a powerful RAG chatbot using Google Drive documents and GPT-4o with this comprehensive n8n workflow. Automate knowledge base creation, handle real-time chat requests, and deploy custom n8n templates.

Deploy a powerful n8n workflow for AI scheduling. This n8n template uses GPT-5, Google Sheets as a knowledge base, Google Calendar, and Gmail for fully automated client support and booking confirmation.

Deploy a powerful n8n workflow for a Telegram chatbot that handles text, audio, images, and documents. Uses GPT-4, Supabase RAG, and persistent conversation memory.

Use this powerful n8n workflow to create a Telegram chatbot integrating multiple AI models via AIMLAPI, complete with daily usage limits tracked in Google Sheets.








































