Building an AI News Automation System from Scratch: A Hands-On Tutorial for Deploying n8n + DeepSeek + Hugo on Ubuntu
Author: HappyRock
Target Audience: Developers, Indie Developers, Technical Managers, AI Enthusiasts
Tech Stack: Ubuntu + Docker + n8n + DeepSeek + Hugo
Preface
In the past few years, we’ve been used to:
Open RSS
↓
Browse News
↓
Filter Hot Topics
↓
Summarize
↓
Write WeChat Article
↓
Publish Blog Post
The whole process often takes 1–2 hours.
But in the era of AI Agents, these tasks can already be handed over to AI.
This article will document the complete process from scratch:
- Deploy n8n on Ubuntu
- Configure Docker Compose
- Connect to DeepSeek API
- Automatically fetch AI news
- Automatically filter and rank hot topics
- Automatically generate WeChat public account content
- Automatically output Hugo Markdown
The result will be your own AI content production system.
1. Why n8n?
When many people first encounter automation, they run into tools like:
Python + Crontab Shell Script Airflow Jenkins
These solutions, while powerful, have a higher barrier to entry.
n8n’s advantages are:
- Low‑code
- Visual workflow designer
- AI support
- Webhook support
- API support
- Database support
- Workflow orchestration
Essentially:
Trigger
↓
Input
↓
Process
↓
Output
It’s no different in principle from what programmers are familiar with:
#php
$data = input();
$result = process($data);
output($result);
2. Deploy Docker on Ubuntu
First, confirm your system:
#bash
lsb_release -a
Example output:
Ubuntu 20.04 LTS
Install Docker:
#bash
curl -fsSL https://get.docker.com | bash
Check the version:
#bash
docker --version
Example:
Docker version 28.1.1
3. Verify Docker Compose
Newer Docker versions include Compose built‑in.
Check:
#bash
docker compose version
Example:
Docker Compose version v5.0.2
If you see:
docker-compose: command not found
it means you are using an older version.
4. Understanding Docker Compose’s Working Directory
Many beginners run into:
#bash
docker compose up -d
and get an error:
no configuration file provided: not found
Reason:
Docker Compose requires a file named
docker-compose.yml
in the current directory.
For example:
#bash
pwd
returns
/home/ubuntu/n8n
and that directory must contain
docker-compose.yml
5. Deploy n8n
Create the directory:
#bash
mkdir ~/n8n
cd ~/n8n
Create the compose file:
#bash
nano docker-compose.yml
Content:
#yaml
version: '3'
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n
ports:
- "5678:5678"
environment:
- TZ=Asia/Shanghai
volumes:
- ./n8n_data:/home/node/.n8n
restart: always
Start the container:
#bash
docker compose up -d
Verify:
#bash
docker ps
If you see
n8n
the deployment succeeded.
6. First Access to n8n
Open your browser and go to:
http://<your_server_ip>:5678
On first access you will see:
Set up owner account
Fill in:
Email
Password
First Name
Last Name
to create the admin account.
7. Understanding Core n8N Nodes
I recommend mastering these first:
Trigger
Triggers:
Manual Trigger
Schedule Trigger
Webhook
Set
Set variables, e.g.:
{
"name":"Jack"
}
IF
Conditional branching:
if
else
HTTP Request
Call APIs:
DeepSeek
OpenAI
Enterprise systems
Code
JavaScript node:
#JavaScript
return [{
json:{
message:"hello"
}
}]
Merge
Merge data streams.
8. Build Your First AI News System
Goal:
RSS
↓
DeepSeek
↓
AI Daily Report
Step1: Schedule Trigger
Configuration:
Every Day
08:00
Step2: RSS Feed Read
OpenAI:
https://openai.com/news/rss.xml
Anthropic:
https://www.anthropic.com/news/rss.xml
DeepMind:
https://deepmind.google/blog/rss.xml
Step3: Merge
Mode:
Append
Effect:
OpenAI + Anthropic + DeepMind = Unified news stream
Step4: Code Node to Format News
#JavaScript
const news = items.map(i => ({
title: i.json.title,
link: i.json.link
}));
return [{
json:{
news
}
}];
9. Call DeepSeek
HTTP Request node:
POST
https://api.deepseek.com/chat/completions
Headers:
Authorization
Bearer sk-xxxx
Content-Type
application/json
10. Common Error Troubleshooting
1. Authorization failed
Reasons:
Wrong Bearer format
Invalid API key
Header placed incorrectly
Correct format:
Authorization: Bearer sk-xxxx
2. Invalid JSON
Example error:
Bad control character
Reason:
Line breaks break JSON
Solution:
#JavaScript
JSON.stringify()
3. [object Object]
Error:
The value "[object Object]" is not supported
Reason: Trying to concatenate an object directly into a string.
Wrong:
#JavaScript
content: $json.news
Correct:
#JavaScript
content: JSON.stringify($json.news)
11. Enterprise‑Grade Prompt Design
Ordinary user prompt:
Please summarize the following news
Average results.
Enterprise‑grade prompt:
You are a senior AI industry analyst and tech media editor.
Tasks:
1. Value scoring
2. News filtering
3. Hot topic ranking
4. Categorization
5. Output a WeChat‑style article
12. AI News Filtering System
Let DeepSeek perform:
Filter
↓
Rank
↓
Analyze
↓
Output
Requirement:
Score >= 7
Output:
</>MarkDown
# Today's AI Industry Updates
## Key Highlights
## Industry Analysis
## Takeaways for Developers
## Summary
13. Upgrade to a Content Factory
Add further automation:
Auto‑generated titles
Prompt:
Generate 10 viral WeChat article titles
Example:
OpenAI drops another bombshell – is the AI industry about to change?
Auto‑generated cover copy
Example:
OpenAI and Anthropic make moves on the same day – AI competition enters a new phase
Auto‑generated Markdown
Output:
</>MarkDown
---
title: Today's AI Industry Updates
date: 2026-06-15
draft: false
---
Article content...
14. Integrate with Hugo for Automatic Publishing
Workflow:
RSS
↓
DeepSeek
↓
Markdown
↓
Write File
↓
Git Push
↓
GitHub Action
↓
Hugo
↓
HappyRock Blog
Automatically creates:
content/blog/2026-06-15-ai-news.md
15. Future Upgrade Roadmap
Level 1
RSS
↓
Summary
Level 2
RSS
↓
Filter
↓
Rank
Level 3
RSS
↓
WeChat article
Level 4
RSS
↓
AI Agent
↓
WeChat public account
↓
Blog
↓
Email
↓
Corporate knowledge base
Summary
Through this hands‑on project, we have successfully:
✅ Deployed Docker on Ubuntu
✅ Deployed n8n with Docker Compose
✅ Configured the DeepSeek API
✅ Aggregated multiple RSS sources
✅ Filtered and ranked AI news
✅ Generated WeChat‑style content
✅ Designed an automatic Hugo publishing architecture
More importantly, we have grasped a key concept:
n8n is not just a simple automation tool – it is a workflow orchestration platform for the AI Agent era.
For developers, the truly valuable skills in the future will no longer be just writing code, but being able to leverage AI, workflows, and automation systems – handing repetitive work over to machines, and saving time for creativity and decision‑making.
Next, you can easily extend this architecture:
- Enterprise AI strategy daily report
- Automatic AI knowledge base updates
- AI hot topic monitoring system
- AI Agent content factory
- Dual‑platform (Hugo + WeChat) automated operation
This is the “second productivity system” that indie developers and content creators should invest in during the AI era.