AI Agent drives automated website operations: Build a fully automatic content pipeline in 30 minutes
From content collection, rewriting to automatic publishing, AI Agent is used to realize 24/7 unattended operation of the website.
Intermediate · 30 min · May 18, 2026
Tutorial Objectives
Within 30 minutes, build a complete AI Agent content automation pipeline: RSS/webpage collection → AI rewriting → multi-platform publishing, all completed automatically. This article is a complete step-by-step tutorial.
What will you build?
- Automated content collector: regularly capture RSS sources and target web pages to extract structured information
- AI content rewriting engine: Use OpenAI/Claude to rewrite collected content into original articles
- Automatic publishing robot: Publish directly to WordPress, WeChat public accounts and other platforms through API or MCP protocol
- Monitoring Board: View running status and output statistics in real time
Preparation list
- OpenAI API Key (or Claude API, free limit starting at $5)
- n8n (self-hosted free version or cloud trial account)
- API permissions of the target website (WordPress REST API, WeChat public account development permissions, etc.) -Basic command line operation knowledge (or n8n graphical interface available from scratch)
Overall architecture
The entire assembly line is disassembled into 4 modules, which can be built in sequence and connected in series to form a complete link.
| Module | Input | Output | Estimated time |
|---|---|---|---|
| Content collection | RSS URL / web page URL | Structured article list (JSON) | 5 minutes |
| AI rewritten | Original JSON | Rewritten Markdown article | 10 minutes |
| Quality review | Markdown article | Approved final draft | 5 minutes |
| Publish Push | Final JSON | Publish Success Confirmation | 10 Minutes |
Step 1: Build a content collector
First create a new Workflow in n8n and add the RSS Feed Read node.
Configure RSS feed
Choose high-quality RSS feeds in your niche. For the field of AI tools, the following sources are recommended:
| RSS Feed | URL | Update Frequency |
|---|---|---|
| Hacker News | https://hnrss.org/frontpage | Live |
| The Verge AI | https://www.theverge.com/ai-artificial-intelligence/rss.xml | Hourly |
| 36Kr AI | https://36kr.com/feed | Every day |
{
"rss_url": "https://hnrss.org/frontpage",
"limit": 10,
"cache_timeout_minutes": 30
}提示:建议同时采集 2-3 个源,用后续的 Merge 节点合并去重。
添加内容过滤节点
在 RSS 节点后添加 IF 节点,设置过滤条件:只保留标题中包含关键词的文章(如 "AI"、"agent"、"automation"、"LLM"),避免无关内容进入流水线。
第 2 步:配置 AI 改写引擎
内容采集到后,需要让 AI 将其改写成适合你网站风格的文章。添加 OpenAI 节点,配置如下:
{
"model": "gpt-4o-mini",
"system_prompt": "你是一位专业的技术内容写手。请将以下文章改写成自媒体风格的原创内容。要求:1) 保留核心事实和数据 2) 增加中文读者熟悉的类比和场景 3) 输出 Markdown 格式 4) 控制在 500-800 字",
"temperature": 0.7,
"max_tokens": 2000
}推荐使用 OpenAI 来完成这一步,OpenAI API 的 gpt-4o-mini 模型性价比极高,每 100 万 token 仅 $0.15,改写一篇文章成本不到 1 分钱。
改写质量检查
在 OpenAI 节点后添加一个 Code 节点,运行以下 JavaScript 检查改写质量:
// 质量检查:确保内容符合基本标准
const article = $input.first().json;
const body = article.body_markdown || '';
const issues = [];
if (body.length < 300) issues.push('内容过短');
if (body.includes('仅供参考')) issues.push('包含禁用免责声明');
if ((body.match(/[。!?]/g) || []).length < 5) issues.push('段落不完整');
return {
passed: issues.length === 0,
issues: issues,
article: article
};SEO+GEO:这个质量门确保发布的内容对搜索引擎友好(足够长、结构完整),同时更容易被 AI 问答引擎引用。
第 3 步:配置自动发布系统
改写通过后,需要将文章发布到目标平台。以下是 WordPress 的配置示例:
WordPress REST API 发布
添加 HTTP Request 节点,配置 POST 请求到 WordPress 站点:
{
"method": "POST",
"url": "https://你的网站.com/wp-json/wp/v2/posts",
"authentication": "basicAuth",
"body": {
"title": "{{ $json.title }}",
"content": "{{ $json.body_markdown }}",
"status": "draft",
"categories": [5],
"tags": ["AI", "automation"]
}
}微信公众号同步(进阶)
如果目标平台是微信公众号,则需要通过 WeChat MCP 协议完成发布。WeChat MCP 使用 SSE(Server-Sent Events)+ JSON-RPC 协议:
- 上传 Markdown 文件 → 获取
file_id - 连接 SSE 端点获取
sessionId - 发送
initialize握手 - 调用
tools/call→publish_article
详细实现参见教程末尾的参考视频。
第 4 步:串联成完整流水线
将以上 3 个模块用 n8n 的 Webhook 节点串联。添加一个 Schedule 触发器,设置定时执行:
| 配置项 | 值 | 说明 |
|---|---|---|
| Trigger | Cron | 使用 Cron 表达式 |
| 执行频率 | 0 */4 * * * | 每 4 小时运行一次 |
| 时区 | Asia/Shanghai | 与中国时间对齐 |
| 失败重试 | 3 次 | 网络抖动自动重试 |
完整工作流结构
Schedule (每4h) → RSS Feed Read → IF 过滤 → OpenAI 改写
→ Code 质量检查 → HTTP Request 发布 → 通知 (Telegram/Email)常见问题排查(FAQ)
Q1:n8n 自托管需要什么配置?
最低配置:1 核 CPU、2GB 内存的 VPS(推荐 DigitalOcean $6/月方案)。Docker 一键安装:docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n。
Q2:AI 改写的内容会不会被 Google 判定为低质量?
关键在于质量门:确保改写内容增加 40% 以上新信息(案例、本地化类比、实用建议),而不是简单的同义替换。Google 2025 年的算法更新已经能区分"有价值改写"和"低质量同义替换"。
Q3:API 费用大概多少?
以每天采集+改写 10 篇文章计算,使用 gpt-4o-mini:约 $0.15/天。n8n 自托管免费。WordPress 免费。投入产出比极高。
SEO+GEO:FAQ 结构满足 GEO 提取偏好,同时覆盖长尾搜索词
工具词条(触发工具悬浮卡)
正文中自然出现的工具名,平台侧会匹配已维护 tools 库生成 hover-card:
OpenAI、ChatGPT、Claude、n8n、Hermes Agent、DeepSeek
Reference video/material
Internal link guidance
- Someone has successfully practiced it: 我用 n8n + OpenAI 搭建 AI 内容自动化网站:月入 $4,500 的完整复盘
- Real case: 独立开发者用n8n+OpenClaw搭建自动化工作流,月入5000美元的实战案例
- Deep Learning: AI Agent 驱动内容自动化:n8n MCP 从零搭建指南
Related tutorials
AI Coding Agents Complete Guide: Setup, Security, Workflow & Case Studies
If you are researching AI coding agents and want to know which one to use, how to set it up safely, and what real developers are building with them — this hub organizes every tutorial, case study, and comparison we have published. Start with the decision guide below to find the right path for your skill level and goals.
AI Micro SaaS FAQ: 25 Common Questions Answered (2026)
Everything you need to know about building and profiting from AI Micro SaaS products. This FAQ covers idea generation, tech stack choices, pricing strategy, marketing on a $0 budget, legal considerations, and scaling from $100 to $10K MRR. Based on real case studies and data from successful solo builders using Claude Code, Cursor, and other AI coding tools.
Topic hub
YouTube AI Content Policy Hub
Answer-style evergreen hub for AI labels, auto detection, and disclosure—not just breaking news.
Explore YouTube AI Content Policy Hub →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services