Build a dynamic, site-aware AI assistant using this advanced n8n workflow. Integrates DeepSeek via OpenRouter, Pinecone for RAG, and Postgres for history, enabling multi-site support.
Download this n8n workflow template and start using it instantly.
This specialized n8n workflow solves the common challenge of running a single, scalable AI assistant infrastructure that must serve multiple, distinct websites or products. Instead of deploying separate n8n workflows for each site, this centralized automation uses a powerful Switch n8n node to inspect the incoming request's site parameter. This allows the system to efficiently route the user's query to the appropriate, pre-configured AI Agent. Each agent maintains its own Postgres chat memory for conversational context and connects to its unique set of Pinecone knowledge bases (vector stores), ensuring answers are always site-specific and accurate. This robust n8n automation architecture is ideal for scaling support operations while maintaining strict contextual boundaries, making it one of the most useful n8n templates available for complex AI applications.
The execution of this robust n8n workflow begins with the Webhook n8n trigger. This n8n trigger awaits an external request (likely from a web chat interface), which must include parameters such as query (the user's question), userId (for memory tracking), and crucially, site (to identify the originating website).
$json.query.site value.testsite, testsite2, test_site3), the Switch routes the flow to the correct AI Agent branch. This dynamic routing is the core logic that makes this an effective multi-site n8n workflow template.AI Agent for groton), the AI Agent n8n node orchestrates the RAG process. It uses the OpenRouter Chat Model (running DeepSeek) as its LLM, retrieves chat history from the Postgres Chat Memory n8n node (keyed by userId), and utilizes the connected Pinecone Vector Store n8n nodes as external tools for factual retrieval. The Cohere Embeddings n8n node facilitates the vector search.site and page context) to generate a response strictly based on the verified information in its corresponding Pinecone index.To set up this powerful n8n workflow template, follow these steps:
Pinecone Vector Store n8n node configurations (e.g., ServicePackagesOverview, ghostwr, ebookwr).Postgres Chat Memory n8n node to maintain session continuity for each user (userId).query, userId, and site parameters correctly in the request.This n8n workflow utilizes several advanced nodes, primarily from the LangChain community package:
Webhook n8n trigger: Serves as the initiation point for the entire n8n workflow.
Function: Triggers the n8n workflow upon receiving an HTTP request containing user query, site ID, and user ID.
Key Configuration: Configured with a unique path and set to wait for a response node.
Switch n8n node: The core logic gate.
Function: Directs the n8n workflow path based on the value of {{ $json.query.site }} (e.g., routing to agents for testsite, testsite2, or test_site3).
AI Agent (LangChain) n8n node: Multiple instances exist, forming the brain of this n8n automation.
Function: Orchestrates the retrieval augmented generation (RAG) process, combining LLM capabilities with factual data from Pinecone.
Key Configuration: Uses extensive, site-specific systemMessage prompts to enforce strict context boundaries and tool usage.
OpenRouter Chat Model (LangChain) n8n node:
Function: Provides the large language model capabilities, utilizing the DeepSeek model for high-quality responses in this n8n workflow.
Key Configuration: Model set to deepseek/deepseek-chat-v3-0324:free.
Pinecone Vector Store (LangChain) n8n node: Multiple instances are used, often linking different namespaces for specialized knowledge.
Function: Acts as a retrieval tool, querying indexed knowledge bases based on the userโs question using the RAG approach.
Key Configuration: Configured in retrieve-as-tool mode, targeting specific Pinecone namespaces.
Postgres Chat Memory (LangChain) n8n node:
Function: Stores and retrieves the history of the conversation in a Postgres table, ensuring the AI agent maintains conversational flow across multiple turns within the n8n workflow.
Key Configuration: Uses dynamic expression {{ $('Webhook').item.json.query.userId }} as the session key.
Respond to Webhook n8n node: Multiple instances serve as the end point.
Function*: Formats the final AI response into a JSON object and sends it back to the client, concluding the n8n automation execution.
Automate Elasticsearch searches using an n8n workflow form trigger. Generate customizable CSV or Text reports for suspicious transactions and save them instantly using this powerful n8n template.

Deploy a scalable, context-aware AI chatbot using this advanced n8n workflow. Integrates OpenAI and uses MongoDB for real-time knowledge retrieval. Start automating today.

Use this advanced n8n workflow to manage your media library, creating dummy files for instant Plex access and triggering on-demand downloads via Radarr, Sonarr, Tautulli, and Overseerr integration. Get these n8n templates today!

Use this powerful n8n workflow to dynamically set your Gmail out-of-office message based on real-time Google Calendar availability, ensuring accurate replies only when you're truly unavailable.








































