n8n Template: DeepSeek V3 Chat & R1 Reasoning Quick Start
Connect DeepSeek in n8n four ways: credentials → conversational Agent with memory → Ollama local → HTTP Request direct API
- Who
- Automation builders already running n8n who need to quickly wire up DeepSeek V3/R1
- You get
- A reusable workflow template with four integration paths; import, swap credentials, and run
Constraints
Prerequisites: a running n8n instance (self-hosted or Cloud). Prepare one or more credential sets: DeepSeek API Key (openAiApi type), Ollama local endpoint (ollamaApi type), HTTP Header Auth (for HTTP Request nodes). DeepSeek API base URL is https://api.deepseek.com, OpenAI-compatible. Local Ollama must have pulled deepseek-r1:14b or equivalent.
What they did
Author joe published an n8n official template demonstrating four ways to connect DeepSeek: via lmChatOpenAi node calling deepseek-reasoner using OpenAI-compatible format, via lmChatOllama node running deepseek-r1:14b locally, and via two HTTP Request nodes using JSON Body and Raw Body to directly call deepseek-chat (V3) and deepseek-reasoner (R1) chat completions endpoints. The template includes Window Buffer Memory to provide conversational context for the Agent.
How it went
The template has received over 40,000 views on n8n.io (author_report). Node parameters, connection mappings, and credential types are fully defined in workflow.json and ready to import.
Worth knowing
1) No performance or cost benchmarks provided by source; 2) deepseek-chat model name maps to V3 with unchanged API format; 3) Local Ollama requires sufficient VRAM for 14B or larger models; 4) HTTP Request nodes require Bearer Token in httpHeaderAuth Header; 5) Template defaults to inactive—activate manually after import; 6) Not tested by this site (reproduction=not_tested); test with sample messages before production use.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- DeepSeek node: connect OpenAI API credentials.
- Ollama DeepSeek node: connect ollamaApi credentials.
- DeepSeek JSON Body node: connect HTTP Header Auth credentials.
- DeepSeek Raw Body node: connect HTTP Header Auth credentials.
Configuration to replace
- Source template is n8n public workflow #2777 (~15 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-25
Steps
Configure credentials and base parameters
Create credentials in n8n: 1) openAiApi type, Base URL = https://api.deepseek.com, API Key from platform.deepseek.com/api_keys; 2) ollamaApi type pointing to your local Ollama service; 3) httpHeaderAuth type, Header name typically Authorization, value = Bearer + DeepSeek API Key. Sticky Note4 notes: you may also use https://api.deepseek.com/v1 as base_url; the v1 is unrelated to model version.
Setup guidance · Source text。Template overview and quick-start guide
This n8n workflow demonstrates multiple ways to harness DeepSeek's AI models in your automation pipeline! 🌟 ## Core Features **Multiple Integration Methods** 🔌 - Local deployment using Ollama for DeepSeek-R1 - Direct API integration with DeepSeek Chat V3 - Conversational agent with memory buffer - HTTP request implementation with both raw and JSON formats **Model Options** 🧠 - DeepSeek Chat V3 for general conversation - DeepSeek-R1 for advanced reasoning - Memory-enabled agent for persistent context ## Quick Setup 🛠️ **API Configuration** - Base URL: https://api.deepseek.com - Get your API key from platform.deepseek.com/api_keys **Local Setup** 💻 - Install Ollama for local deployment - Set up DeepSeek-R1 via Ollama - Configure local credentials in n8n ## Implementation Details 🔧 **Conversational Agent** - Window Buffer Memory for context - Customizable system messages - Built-in error handling with retries **API Endpoints** 🌐 - Chat completions for V3 and R1 models - OpenAI API format compatibles
Setup guidance · Source text。Sticky Note4 node content; credential configuration reference
# Your First DeepSeek API Call The DeepSeek API uses an API format compatible with OpenAI. By modifying the configuration, you can use the OpenAI SDK or softwares compatible with the OpenAI API to access the DeepSeek API. https://api-docs.deepseek.com/ ## Configuration Parameters | Parameter | Value | |-----------|--------| | base_url | https://api.deepseek.com | | api_key | https://platform.deepseek.com/api_keys | ## Important Notes - To be compatible with OpenAI, you can also use `https://api.deepseek.com/v1` as the base_url. Note that the v1 here has NO relationship with the model's version. - The deepseek-chat model has been upgraded to DeepSeek-V3. The API remains unchanged. You can invoke DeepSeek-V3 by specifying `model='deepseek-chat'`. - deepseek-reasoner is the latest reasoning model, DeepSeek-R1, released by DeepSeek. You can invoke DeepSeek-R1 by specifying `model='deepseek-reasoner'`.
Set up the conversational Agent with memory
After importing the template, locate the AI Agent node (conversationalAgent) and Window Buffer Memory node. AI Agent systemMessage defaults to "You are a helpful assistant."; the DeepSeek node (lmChatOpenAi) has model = =deepseek-reasoner, credential = the openAiApi created in Step 1. Window Buffer Memory keeps default parameters; its ai_memory output connects to AI Agent's ai_memory input. When chat message received triggers, the Agent converses with DeepSeek-R1 using buffered context.
Execution prompt · Source text。AI Agent node parameters.options.systemMessage
You are a helpful assistant.
Configure the Ollama local model chain
Locate Basic LLM Chain2 and Ollama DeepSeek nodes. Basic LLM Chain2 messages.messageValues[0].message is "You are a helpful assistant.". Ollama DeepSeek node (lmChatOllama) parameters: model=deepseek-r1:14b, options.format=default, options.numCtx=16384, options.temperature=0.6, credential=ollamaApi. Ollama DeepSeek's ai_languageModel output connects to Basic LLM Chain2's ai_languageModel input. When chat message received's main output connects to Basic LLM Chain2's main input.
Execution prompt · Source text。Basic LLM Chain2 node parameters.messages.messageValues[0].message
You are a helpful assistant.
Execution prompt · Source text。Ollama DeepSeek node parameters.model
deepseek-r1:14b
Configure HTTP Request direct API calls (JSON Body and Raw Body)
The template provides two HTTP Request node examples. DeepSeek JSON Body node: URL=https://api.deepseek.com/chat/completions, Method=POST, specifyBody=json, jsonBody contains model=deepseek-chat, messages array (system role content = {{ $json.chatInput }}, user role = "Hello!"), stream=false, authentication=genericCredentialType, genericAuthType=httpHeaderAuth. DeepSeek Raw Body node: same URL, contentType=raw, rawContentType=application/json, body contains model=deepseek-reasoner, messages uses {{ $json.chatInput.trim() }}, stream=false, also using httpHeaderAuth. These correspond to direct V3 and R1 calls.
Execution prompt · Source text。DeepSeek JSON Body node parameters.jsonBody
={ "model": "deepseek-chat", "messages": [ { "role": "system", "content": "{{ $json.chatInput }}" }, { "role": "user", "content": "Hello!" } ], "stream": false }Execution prompt · Source text。DeepSeek Raw Body node parameters.body
={ "model": "deepseek-reasoner", "messages": [ {"role": "user", "content": "{{ $json.chatInput.trim() }}"} ], "stream": false }
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
Import this workflow template into n8n, then configure credentials, the Agent memory chain, the Ollama local node, and the HTTP Request direct nodes in order. After import, verify that ai_languageModel / ai_memory / main connections match the template, then replace all credential-id placeholders with live credentials.
If you only need a quick API test, prioritize Step 4's HTTP Request nodes; no LangChain nodes required.
Source
🐋DeepSeek V3 chat & R1 reasoning quick start · joe · n8n.io · 2025-01-22
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.