Integrating DeepSeek into n8n: Low-Cost AI Automations

What is n8n?
n8n is a low-code/no-code automation platform that lets you connect apps, services, and APIs in a visual way. With it, you can create complex workflows without coding, integrating tools like WhatsApp, Google Sheets, and AI models. It’s like a digital LEGO® for automations, offering flexibility and scalability.
Meet DeepSeek
DeepSeek is an open-source AI model that stands out for offering performance comparable to GPT-4 and Claude 3.5 Sonnet, but at significantly lower costs.
DeepSeek Models:
- DeepSeek V3 (Chat):
- Focus: Simple tasks like chatbots and virtual assistants
- Performance: Quick responses, ideal for agile interactions
- DeepSeek R1 (Reasoning):
- Focus: Complex tasks requiring advanced reasoning
- Performance: More elaborate responses but with longer response times (up to 50 seconds)
Price Comparison
To better understand the cost-benefit of DeepSeek…
Model | Input Tokens | Output Tokens |
---|---|---|
DeepSeek V3 (Chat) | $0.01 | $0.28 |
DeepSeek R1 (Reasoning) | $0.14 | $2.19 |
OpenAI GPT-4 | $2.50 | $10.00 |
Claude 3.5 Sonnet | $3.00 | $15.00 |
The above values are approximate and based on information available until February 1, 2025.
How to Integrate DeepSeek with n8n?
First, you’ll need to have n8n installed; follow the official documentation for installation.
Integration Steps:
1. Install the n8n-nodes-deepseek Node:
- In n8n, go to Settings > Community Nodes > Install a community node
- In npm Package Name, type “n8n-nodes-deepseek”, select the checkbox “I understand the risks of installing unverified code from a public source” and click the “Install” button

2. Create the Credentials:
3. Configure the Credentials:
- Create a workflow by clicking “New Workflow” on the Overview tab

- Click on “Add first step” and add a Trigger manually

- Click “+” to add a service and search for “deepseek”

- Click “Create chat completion” to open configuration

- In credentials, click + Create new credential and paste API Key

- Configure model and set messages:
- System Message: “You are a helpful assistant”
- User Message: “Who are you?”

4. Test the call:
- Click “Test step” to process and get response

Note: The V3 will provide a quick return, the R1 is ideal for detailed responses, but the processing time may not be suitable for real-time applications.
5. You did it, congratulations!
Was it difficult? Leave a comment below.
When to Use Each Model?
- DeepSeek V3:
- Ideal for: Chatbots, quick responses, and real-time interactions
- Advantages: Low cost and high speed
- DeepSeek R1:
- Ideal for: Tasks requiring complex reasoning and detailed responses
- Advantages: In-depth analysis, though with longer response times
Conclusion
Integrating DeepSeek with n8n is an effective and economical way to implement AI in your automations. With significantly lower costs compared to other models, you can expand your projects without breaking the bank.