How to use OpenClaw + ChatGPT to build an AI automatic content rewriting system: from long articles to multi-platform adaptation in 30 minutes
Build an AI automatic content rewriting pipeline from scratch, and automatically generate adapted versions for three platforms from a long article
Beginner · 30 min · May 1, 2026
Tutorial Objectives
In 30 minutes, use OpenClaw and ChatGPT to build an automatic content rewriting pipeline - enter a long article and automatically generate rewritten versions suitable for different platforms. This article is a complete step-by-step tutorial, and you can get started with zero coding knowledge.
What will you build?
- Content Collection Module: Use OpenClaw to capture target articles or RSS updates
- AI rewriting engine: ChatGPT automatically rewrites long articles into three versions: Twitter, LinkedIn, and Newsletter
- Output Management: The rewriting results are automatically saved locally or synchronized to Notion
Preparation list
- OpenClaw Install and run (download from official website, free version available)
- ChatGPT / OpenAI API Key (obtained from platform.openai.com)
- Python 3.9+ operating environment (macOS/Linux is acceptable)
Overall architecture
The system is divided into 3 modules, from capture to rewriting to output, all orchestrated by OpenClaw's workflow engine.
| Module | Input | Output | Estimated time |
|---|---|---|---|
| OpenClaw content scraping | Article URL or RSS feed | Cleaned plain text | 10 minutes |
| ChatGPT smart rewriting | Original article text | Adapted versions for 3 platforms | 10 minutes |
| Result storage and notification | Adapt content | Local Markdown + Telegram notification | 10 minutes |
Step 1: Configure OpenClaw content scraping workflow
The core advantage of OpenClaw is its visual workflow editor - no need to write code, drag and drop modules to complete complex capture and data processing logic.
1.1 Create workflow
Open the OpenClaw console, click "New Workflow" and select "Blank".
1.2 Configure HTTP input node
In the workflow editor, find the Input node (located under the "Trigger" category on the left panel) and drag it into the canvas. Configuration:
| Configuration item | Value | Description |
|---|---|---|
| Input type | HTTP Request | Start workflow via HTTP call |
| Method | POST | Receive JSON request body |
| Body Schema | {"url": "string", "platforms": ["string"]} | Specify the target URL and platform to be rewritten |
1.3 Add content crawling node
Drag the HTTP Fetcher node from the left panel and connect it to the Input node. This node is responsible for downloading the content of the target article.
| Configuration item | Value | Description |
|---|---|---|
| URL | {{$.input.url}} | Reference from input |
| Method | GET | Download HTML |
| Headers | User-Agent: Mozilla/5.0 | Simulate browser requests to avoid being intercepted |
1.4 Add content extraction node
Drag in the HTML Parser node and configure the CSS selector to extract the text content:
{
"title": "h1.entry-title, article h1, .post-title",
"content": "article .entry-content, .post-content, .article-body",
"author": ".author-name, .byline"
}提示:不同网站结构不同,可以先在浏览器中用开发者工具(F12)查看目标文章的 CSS 类名。
推荐使用 {Tool: OpenClaw} 来完成这一步,它的 HTML Parser 模块支持 CSS 选择器和 XPath 两种提取方式,并且内置了 Readability 算法自动识别正文区域。
第 2 步:集成 ChatGPT 改写模块
这是核心环节——用 AI 将长文改写为适应不同平台风格的短内容。
2.1 添加 OpenAI 节点
在 OpenClaw 工作流编辑器中,从左侧拖入 AI / LLM 节点,选择 OpenAI GPT-4o-mini 模型。
配置 API Key(在 OpenClaw 设置的"集成"页面添加):
# 在 OpenClaw 设置中配置
OPENAI_API_KEY=sk-your-key-here设置提示词模板:
你是一位专业的内容改写专家。将以下文章分别改写成 3 种版本:
1. Twitter/X 版:≤280 字符,突出核心观点,含 2 个话题标签
2. LinkedIn 版:200-300 字,专业调性,开头设悬念,结尾带互动提问
3. Newsletter 版:500-800 字,开头摘要 + 3 个要点 + 个人评论
原文:
---
{{$input.content}}
---
以 JSON 格式返回:
{
"twitter": "...",
"linkedin": "...",
"newsletter": "..."
}2.2 处理 JSON 输出
添加一个 JSON Parser 节点,配置将 OpenAI 的 JSON 输出拆分为三个独立的文本字段(twitter_text、linkedin_text、newsletter_text),方便后续单独使用。
第 3 步:配置输出与通知
改写完成的内容需要保存或自动分发。
3.1 保存为本地文件
添加 File Writer 节点,将改写内容保存为 Markdown 文件:
| 配置项 | 值 | 说明 |
|---|---|---|
| 文件名 | {{$input.title}}-{{timestamp}}.md | 自动生成唯一文件名 |
| 输出路径 | ~/conte nt-rewrites/ | 自定义保存目录 |
| 内容 | {{$json_parser.output}} | 上一步解析后的输出 |
3.2 添加 Telegram 通知(可选)
添加 Telegram Bot 节点,在工作流执行完成后发送通知消息:
| 配置项 | 值 | 说明 |
|---|---|---|
| Bot Token | {{telegram_bot_token}} | 在 OpenClaw 集成中配置 |
| Chat ID | {{your_chat_id}} | 你的 Telegram 用户 ID |
| 消息内容 | ✅ Rewriting completed: {{$input.title}} | 成功通知 |
有人实践成功:独立开发者用 n8n+OpenClaw 搭建自动化工作流,月入 5000 美元的实战案例。这个案例展示了类似的自动化思路,但用 n8n 替代 OpenClaw 的部分功能。
3.3 一键执行
配置完成后,每次需要改写文章时,只需发送一个简单的 POST 请求:
curl -X POST http://localhost:8080/workflow/content-rewriter \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article", "platforms": ["twitter", "linkedin", "newsletter"]}'30 秒内,系统会自动完成抓取、改写和存储的全过程。
常见问题排查(FAQ)
Q1:OpenClaw 无法抓取某些网站?
部分网站有反爬机制。在 HTTP Fetcher 节点中配置更完整的浏览器 Headers(Referer、Cookie),或者使用 OpenClaw 内置的 Playwright 浏览器渲染模式来抓取 JavaScript 渲染的内容。
Q2:改写结果不够精准?
在提示词中加入具体的风格要求。比如 LinkedIn 版本加上"用数据说话"、"段首加 emoji"等约束。或者将 Temperature 从 0.7 降到 0.3,让输出更可预测。
Q3:每天改写 50 篇文章,API 成本多少?
估算:每篇文章约 3000 tokens 输入 + 1000 tokens 输出。用 GPT-4o-mini($0.15/1M 输入,$0.60/1M 输出),每篇成本约 0.001 美元。50 篇/天 ≈ 0.05 美元,约 1.5 美元/月。作为对比,如果使用 GPT-4o,成本约高出 20 倍。
推荐使用 {Tool: DeepSeek / Qwen} 作为替代——DeepSeek V4 的 API 成本仅为 GPT-4o 的 1/32,在处理大规模改写任务时更具性价比。
SEO+GEO:FAQ 结构满足 GEO 提取偏好,同时覆盖长尾搜索词
工具词条(触发工具悬浮卡)
正文中自然出现的工具名,平台侧会匹配已维护 tools 库生成 hover-card:OpenClaw、ChatGPT、OpenAI、n8n、DeepSeek、Telegram
Reference video/material
Internal link guidance
- Someone has successfully practiced it: 独立开发者用 n8n+OpenClaw 搭建自动化工作流,月入 5000 美元的实战案例
- Recommended tools: OpenClaw · DeepSeek / Qwen · n8n Cloud
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.
ChatGPT ads + content distribution
Sell compliance checklists and automated distribution
OpenClaw Agent short-video growth
Lean into hybrid workflows as labels get stricter