Brandable DeepSeek AI Chatbot Backend API - n8n Workflow

Deploy a custom-branded website chatbot API using this specialized n8n workflow. It integrates the DeepSeek AI model and session memory via an n8n trigger for a seamless, high-performance conversational experience.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Web Developers and Integrators: Those needing a quick, scalable AI backend without managing complex server infrastructure. Business Owners: Individuals who want to add a professional, branded AI assistant to their e-commerce or corporate website. n8n Automation Specialists: Users looking for advanced examples of LangChain integration within an n8n workflow. Marketers: Teams focused on enhancing customer experience using powerful, customizable AI tools based on pre-built n8n templates.

Overview

Building a custom, branded chatbot historically required significant backend engineering. This specialized n8n workflow simplifies the process entirely, acting as a high-performance API endpoint for any website chat widget.

This solution leverages the power of the DeepSeek language model for accurate responses while utilizing persistent session memory to ensure continuous, context-aware conversations. By using a standard n8n trigger (a Webhook), the service is highly accessible and scalable. Whether you are using one of the many n8n templates available or building from scratch, this n8n node configuration ensures robust handling of cross-origin requests and custom session identification, making it perfect for production deployment.

How it Works

This powerful n8n workflow operates as a dedicated chatbot API, initiating every conversation flow with a simple HTTP request.


  1. Initiation via n8n Trigger: The process begins when the custom chat widget (deployed on the user's website) sends a POST request containing the user's message and unique sessionId to the Webhook (POST) n8n trigger node (/brand-bot).

  2. AI Processing: The received message is passed to the AI Agent n8n node, which orchestrates the generation of the response.

  3. Language Model and Memory Integration: The AI Agent is connected to two critical components: the DeepSeek Chat Model (handling the core generative task) and the Simple Memory n8n node. This memory node uses the incoming sessionId to recall prior conversation history, ensuring the chatbot remains context-aware throughout the session.

  4. Response Handling: The final text response generated by the DeepSeek model is piped directly to the Respond to Webhook n8n node.

  5. API Output: The Respond to Webhook node immediately returns the AI's answer, along with necessary CORS headers (Access-Control-Allow-Origin: *), back to the requesting chat widget, completing the cycle. This seamless integration showcases the efficiency of this specific n8n workflow.

Installation Guide

To deploy this n8n workflow and create your own chatbot API, follow these steps:


  1. Import the n8n Template: Copy the entire JSON code and import it directly into your n8n instance via the 'New' menu and selecting 'Import from JSON'.

  2. Activate Webhook Trigger: Click on the Webhook (POST) n8n trigger node and click 'Activate' to generate the unique live URL for your endpoint (e.g., YOURN8NURL/webhook/brand-bot). This URL will be used by your frontend chat widget.

  3. Configure DeepSeek Credentials: You must provide credentials for the DeepSeek Chat Model n8n node. Click on the node, select 'New Credentials', and enter your DeepSeek API key.

  4. Activate the n8n Workflow: Save and activate the entire n8n workflow.

  5. Frontend Integration: Update your custom chatbot widget (not included in this n8n template) to point its API calls to the live Webhook URL generated in Step 2.

Node Details

This n8n workflow utilizes several key n8n node types to manage the API flow and AI logic:

Webhook (POST) n8n trigger: The entry point for the API. It listens for incoming POST requests on the path /brand-bot. This essential n8n node captures the user message and session ID required for state management. AI Agent n8n node: This orchestrator node processes the incoming message ({{ $json.body.message }}). It uses the attached Language Model (DeepSeek) and Memory (Simple Memory) to formulate the best response. DeepSeek Chat Model n8n node: Configured with user API credentials, this provides the generative AI capabilities. It is the core intelligence behind this n8n workflow. Simple Memory n8n node: A crucial LangChain n8n node configured to use the incoming sessionId ({{ $('Webhook (POST)').item.json.body.sessionId }}) to ensure conversation history is maintained across multiple user turns. Respond to Webhook n8n node: This final n8n node formats and sends the generated AI response back to the client. It is configured with custom headers (Access-Control-Allow-Origin: ) to ensure compatibility with external websites.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all

Featured*