用 n8n 自动撰写博客:OpenAI 生成、Google Sheets 选题、邮件审批与修订
输入 Google Sheets 待写选题 → AI 生成 SEO 博客文章 → 邮件人工审批 → 根据反馈修订或归档
- 给谁
- 需要批量产出 SEO 博客内容的数字营销人员、内容创作者、缺写作资源的小企业主
- 你会得到
- 按定时触发自动从 Google Sheets 取待写选题,由 GPT-4 系列模型生成 800–1200 字 SEO 文章,经邮件审批后归档到 Sheets;支持一键修订
- 你需要
- n8n · Google Sheets · Gmail
硬约束
前置条件:n8n 实例;OpenAI API key;Google Sheets OAuth2 授权;Gmail OAuth2 授权。需复制作者提供的 Google Sheet 模板(含 Topic List 与 Generated Content 两个工作表)。定时触发器可按需调整执行间隔。审批邮件中的收件地址需替换为实际邮箱。费用取决于 OpenAI token 消耗与 n8n 托管方式。
他们做了什么
作者 Billy Christi 在 n8n 官方模板库发布了该工作流模板。模板通过 Schedule Trigger 定时启动,从 Google Sheets 的 Topic List 中拉取状态为 Pending 的选题,交由 AI Agent 生成 SEO 优化的博客文章(800–1200 字),再通过 Gmail 的 sendAndWait 功能发送带审批表单的邮件。审批结果经 Switch 节点分流:通过则更新选题状态并归档到 Generated Content 工作表;拒绝则触发 Revision Agent 根据反馈重写,形成人工审批循环。
效果如何
作者声称该模板可自动化从选题到终稿的内容生产流程,通过人工审批环节保证质量,并支持基于反馈的修订(author_report)。来源未提供具体产出数量、准确率或用户满意度数据。
值得知道
1) 来源未提供 workflow JSON 的直接下载链接,但 n8n 模板页面支持一键导入;2) 默认模型为 gpt-4o-mini,可在 OpenAI Chat Model 节点切换为 gpt-4o 或 gpt-4;3) 审批邮件中的收件人默认是 [email protected],必须修改;4) Simple Memory 使用选题标题作为 sessionKey,用于在生成与修订间保持上下文;5) 修订后的内容会重新进入审批邮件,可能形成多轮循环;6) 本站未实测该工作流,实际 token 消耗与运行稳定性取决于选题长度与模型选择;7) 如需对接 CMS(如 WordPress)或增加关键词研究节点,属于来源建议的扩展方向,非模板自带功能。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- OpenAI Chat Model 节点:绑定OpenAI API 凭证。
- Add Generated Content to Google Sheets 节点:绑定Google Sheets OAuth2 凭证。
- Update Topic Status on Google Sheets 节点:绑定Google Sheets OAuth2 凭证。
- Get Topic from Google Sheets 节点:绑定Google Sheets OAuth2 凭证。
- Send Content for Approval 节点:绑定Gmail OAuth2 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #4371(约 23 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-24
步骤
设置定时触发器
在 n8n 工作流中添加 Schedule Trigger 节点,按需求设定触发间隔(如每小时、每天)。保存后工作流将按此周期自动启动。
从 Google Sheets 获取待写选题
配置 Get Topic from Google Sheets 节点:连接 Google 账号,填入文档 ID,确保存在名为 Topic List 的工作表,且包含 Topic(A 列)与 Status(B 列)。节点将筛选 Status = Pending 的第一条记录,并输出选题标题与行号。
AI 生成 SEO 博客文章
Copywriter AI Agent 节点接收选题,调用 OpenAI Chat Model(默认 gpt-4o-mini,可在节点中切换为 gpt-4o 或 gpt-4)与 Simple Memory、Structured Output Parser 配合,输出包含 title 与 content 的 JSON。提示词要求生成 800–1200 字、带层级标题、SEO 友好的 Markdown 文章。
运行提示词 · 来源原文。Copywriter AI Agent 节点的 text 参数(System Prompt / Define Prompt)
=You are an expert-level SEO content strategist and copywriter with years of experience writing high-performing blog posts. Your task is to: 1. Improve the provided topic title by generating a better, SEO-optimized blog post title that is more attractive and ranks well on search engines. 2. Write a complete blog post based on the improved title. The post must: - Be between 800–1200 words - Use a clear, conversational, and engaging tone - Be SEO-friendly with natural keyword integration - Start with a hooking introduction that introduces the topic smoothly - Use headings and subheadings (H1 for the title, H2 for main sections, H3 for supporting points) - Use bullet points or numbered lists where helpful - Have a strong conclusion that summarizes the key points and includes a call-to-action or final insight - Ensure smooth flow and concise, informative paragraphs 3. Output the result as a JSON object with this format: ```json { "title": "Improved SEO-Optimized Title", "content": "Full blog post content in markdown format" } ``` Here is the topic you should improve and write about: {{ $json.Topic }} Generate the improved title and the full blog post now.发送邮件请求人工审批
Set Data 节点将 AI 输出拆分为 Topic Title 与 Content 两个字段,传给 Send Content for Approval(Gmail 节点)。该节点使用 sendAndWait 操作,向指定邮箱发送含标题与正文的邮件,并附带审批表单:下拉选项为 Yes / No / Cancel,以及 Content Feedback 文本框。工作流将暂停直到收到回复。
根据审批结果分支处理
Approval Result(Switch 节点)读取审批表单中的 Approve Content? 字段:选择 Yes 进入归档流程;No 进入修订流程;Cancel 同样更新选题状态为 Completed(不再生成)。
按反馈修订内容
若审批结果为 No,Copywriter Revision Agent 节点将原始选题、用户反馈与初稿内容一并送入同一 OpenAI Chat Model,输出修订后的文章。修订要求保留原文优点,按反馈调整,保持 800–1200 字与 SEO 结构。修订后回到 Set Data 节点,再次进入审批流程。
运行提示词 · 来源原文。Copywriter Revision Agent 节点的 text 参数(System Prompt / Define Prompt)
=You are an expert-level copywriter with strong SEO knowledge and a clear, engaging writing style. Your task is to revise an existing blog post based on the given topic and user feedback. Here are your responsibilities: - Carefully apply all of the user's feedback to improve the blog post. - Preserve the good parts of the original content, but rewrite or adjust areas based on the feedback. - Keep the tone friendly, professional, and easy to read. - Organize the blog post with clear headings and subheadings. - Use bullet points or numbered lists when it makes the content clearer. - Ensure a strong hook in the introduction and a solid conclusion with a call-to-action or takeaway. - Aim for a length between 800–1200 words unless the feedback suggests otherwise. Here is the topic title: {{ $('Get Topic from Google Sheets').item.json.Topic }} Here is the user's feedback: {{ $('Send Content for Approval').item.json.data['Content Feedback'] }} Here is the original content: {{ $('Copywriter AI Agent').item.json.output }} Now, rewrite the blog post using this input, fully incorporating the feedback.更新状态并归档终稿
审批通过(Yes)或取消(Cancel)后,Update Topic Status on Google Sheets 节点将该选题的 Status 更新为 Completed,防止重复处理。随后 Add Generated Content to Google Sheets 节点把终稿标题、正文与生成日期追加到 Generated Content 工作表,完成归档。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你正在协助复现 n8n 模板 #4371:自动博客内容生成与邮件审批工作流。请先确认用户已具备 n8n 实例、OpenAI API key、Google Sheets 与 Gmail 的 OAuth2 凭证,并已复制作者的 Google Sheet 模板。然后按以下顺序指导配置:1) 导入 workflow.json;2) 填写文档 ID 与邮箱;3) 检查各节点凭证;4) 测试一条 Pending 选题。不要替用户执行敏感操作(如发送真实邮件)。
搭建前请准备好 OpenAI API key、Google 账号授权、Gmail 授权,以及复制好的 Google Sheet 模板链接。
来源
Automate blog content creation with OpenAI, Google Sheets & email approval flow · billy · n8n.io · 2025-05-25
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。