WayToClawEarn
Intermediate30 min readMay 18, 2026

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.

ModuleInputOutputEstimated time
Content collectionRSS URL / web page URLStructured article list (JSON)5 minutes
AI rewrittenOriginal JSONRewritten Markdown article10 minutes
Quality reviewMarkdown articleApproved final draft5 minutes
Publish PushFinal JSONPublish Success Confirmation10 Minutes

Text example image — n8n workflow structure overview

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 FeedURLUpdate Frequency
Hacker Newshttps://hnrss.org/frontpageLive
The Verge AIhttps://www.theverge.com/ai-artificial-intelligence/rss.xmlHourly
36Kr AIhttps://36kr.com/feedEvery day
json
{
  "rss_url": "https://hnrss.org/frontpage",
  "limit": 10,
  "cache_timeout_minutes": 30
}

提示:建议同时采集 2-3 个源,用后续的 Merge 节点合并去重。

添加内容过滤节点

在 RSS 节点后添加 IF 节点,设置过滤条件:只保留标题中包含关键词的文章(如 "AI"、"agent"、"automation"、"LLM"),避免无关内容进入流水线。

Text example image — rss feed filter configuration

第 2 步:配置 AI 改写引擎

内容采集到后,需要让 AI 将其改写成适合你网站风格的文章。添加 OpenAI 节点,配置如下:

json
{
  "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 检查改写质量:

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 站点:

json
{
  "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 协议:

  1. 上传 Markdown 文件 → 获取 file_id
  2. 连接 SSE 端点获取 sessionId
  3. 发送 initialize 握手
  4. 调用 tools/callpublish_article

详细实现参见教程末尾的参考视频。

第 4 步:串联成完整流水线

将以上 3 个模块用 n8n 的 Webhook 节点串联。添加一个 Schedule 触发器,设置定时执行:

配置项说明
TriggerCron使用 Cron 表达式
执行频率0 */4 * * *每 4 小时运行一次
时区Asia/Shanghai与中国时间对齐
失败重试3 次网络抖动自动重试

完整工作流结构

code
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:

OpenAIChatGPTClauden8nHermes AgentDeepSeek

Reference video/material

Internal link guidance

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.

Related tutorials