n8n 自动博客工作流:Perplexity 研究 + Claude 撰写并保存至 Google Docs
定时触发 → Perplexity 搜索最新 AI 资讯 → Claude AI Agent 生成 SEO 博客 → 自动写入 Google Docs
- 给谁
- 适合希望自动化内容产出的创作者、营销人员和小型内容团队,需使用 n8n 自托管版本
- 你会得到
- 按设定周期自动生成研究充分、面向非技术读者的 SEO 优化博客文章,并保存到指定 Google 文档
- 你需要
- n8n · perplexity · google-docs
硬约束
前置条件:n8n 自托管实例(社区节点不兼容 Cloud)。需准备 Perplexity API Key、Anthropic API Key、Google Docs OAuth2 凭证。在 n8n 中导入模板后,按节点顺序配置凭证、研究提示词、AI Agent 写作指令、目标文档链接,再激活工作流。费用取决于各 API 的实际调用量。
他们做了什么
创作者 marconi 在 n8n 官方模板库发布了一个工作流模板,利用 Schedule Trigger 定期触发,先由 Perplexity AI 搜索最新 AI 新闻,再将搜索结果传给配置 Claude 4 Sonnet 的 AI Agent,Agent 依据一份详细的 system prompt 生成面向非技术读者的 SEO 博客文章,最终通过 Google Docs 节点自动保存到指定文档。模板还包含 Simple Memory 和 Perplexity Search Tool 作为 AI Agent 的子节点,用于增强上下文记忆和事实核查能力。
效果如何
来源为模板展示(template),未提供具体运行日志或输出样例。模板描述声称可生成 'fresh, SEO-optimized blog posts daily',并面向 'non-technical audience'。实际效果取决于 Perplexity 搜索结果质量、Claude 模型输出稳定性以及提示词适配程度。
值得知道
该模板包含社区节点,仅兼容 n8n 自托管版本,不适用于 n8n Cloud。Perplexity Search Tool 的消息字段使用 n8n 自动生成的 fromAI 表达式,非人工编写提示词。Google Docs 节点的 documentURL 在模板中为空,用户必须手动填入目标文档链接,否则无法执行更新操作。本站未对该工作流进行实测(reproduction=not_tested),搭建后建议先用测试运行验证各节点输出。API 调用会产生费用,具体金额取决于运行频率与模型选择。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- perplexity 节点:绑定Perplexity API 凭证。
- perplexityTool 节点:绑定Perplexity API 凭证。
- googleDocs 节点:绑定Google 相关 OAuth2 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #5202(约 12 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-24
步骤
导入模板并配置触发器
在 n8n 自托管实例中打开模板链接或导入 workflow.json。找到 Schedule Trigger 节点,设置运行间隔(如每天一次)。确认 instance 已启用社区节点安装权限。
配置 Perplexity 研究节点
打开 'Perplexity - Blog Topic Research Node',绑定 perplexityApi 凭证。模型保持 sonar-pro,searchRecency 设为 week。在 Messages 中确认或替换为以下提示词,用于获取面向非技术读者的最新 AI 新闻。
运行提示词 · 来源原文。Perplexity - Blog Topic Research Node / parameters.messages.message[0].content
Research on the latest AI news that will be interesting to blog about. Choose and return only the most interesting news for the blog intended for non-technical audience trying to learn more about AI.
配置 AI Agent 与 Claude 模型
将 Anthropic Chat Model 节点绑定 anthropicApi 凭证,模型选择 Claude 4 Sonnet(claude-sonnet-4-20250514)。在 AI Agent 节点中,确认 Input Text 使用表达式 '={{ $json.choices[0].message.content }}' 以接收 Perplexity 输出;Prompt Type 选择 'Define',并在 System Message 中填入以下完整提示词。
运行提示词 · 来源原文。AI Agent / parameters.options.systemMessage
=You are a professional blog content writer for a tech news site that translates the latest AI breakthroughs and developments into engaging, non-technical blog posts. Your task is to write a clear, captivating, and SEO-optimized blog post based on the latest AI topic provided by the previous node (Perplexity AI Search output). The post should be easy to understand by general readers with no technical background, while still sounding informed, current, and exciting. INSTRUCTIONS: Audience: General readers, professionals, and business folks curious about AI—but not developers or engineers. Tone & Style: Friendly, conversational, curious Not clickbait, but exciting and easy to read Avoid jargon unless necessary, and always explain it simply Use storytelling or a real-world metaphor/example when possible Format: Title (must include primary keywords related to the topic) 1-paragraph Hook/Intro (make the reader want to read on) 3–5 short sections with headers Final Takeaway / What this means for the average reader SEO Meta Description (max 155 characters) Include 3–5 SEO keywords naturally in the body Use bullet points or bolding to improve skimmability Rules: Do not fabricate facts. If additional context is needed, call the Perplexity Search Tool for clarification Do not overuse buzzwords or technical terms—explain them simply if used Keep paragraphs short and engaging Example Topics This Prompt Can Work For: “How Apple is using AI in its new products” “Why the EU is regulating AI and what it means for us” “OpenAI’s latest model and what it can do for small businesses” # [Catchy SEO Blog Title with Keyword] *[Optional Subtitle for clarity]* **Intro:** [Compelling hook paragraph that introduces the topic with relevance and clarity.] ## [Subheading 1] [Explain one key point from the research, in a simple, friendly way.] ## [Subheading 2] [Another key aspect, ideally with a metaphor, stat, or quote.] ## [Subheading 3] [Implications, opportunities, or what to look out for.] **Takeaway:** [A 2–3 sentence wrap-up telling readers what they should remember or what action they might take.] **Meta Description:** [Short, SEO-focused summary of the blog post. Max 155 characters.] **SEO Keywords:** [Include a few relevant SEO keywords you naturally used in the blog.]
连接记忆与搜索工具(可选但建议)
将 Simple Memory 节点的 ai_memory 输出连接到 AI Agent 的 ai_memory 输入,使 Agent 具备短期上下文记忆。将 Perplexity Search Tool 的 ai_tool 输出连接到 AI Agent 的 ai_tool 输入,供 Agent 在需要核实事实时自动调用。Perplexity Search Tool 的 messages.content 使用 n8n 自动生成的 fromAI 表达式,无需手动修改。
配置 Google Docs 输出节点
打开 Google Docs 节点,绑定 googleDocsOAuth2Api 凭证。Operation 选择 'Update',Action 选择 'Insert',Text 使用表达式 '={{ $json.output }}' 以接收 AI Agent 的最终输出。在 documentURL 字段填入目标 Google 文档的完整链接(模板中此字段为空,必须手动填写)。
激活并测试工作流
保存所有节点配置,激活工作流。可手动点击 'Execute Workflow' 进行首次测试,检查 Perplexity 返回的研究内容、AI Agent 生成的博客格式、以及 Google Docs 是否正确插入文本。根据测试结果调整 System Message 或文档链接。
可复制提示词
搭建指导 · 本站建议版本。搭建助手启动词,用于确认前置条件与凭证状态,不替代节点运行指令
这一段是提示词,页面不会在这里插入广告。
你正在协助复现一个 n8n 工作流模板。请按以下顺序确认:1) 用户是否使用 n8n 自托管版本;2) 是否已获取 Perplexity、Anthropic、Google Docs 三类凭证;3) 是否已导入 workflow.json 或从模板链接创建副本;4) 是否已按步骤配置各节点参数,特别是 AI Agent 的 System Message 全文与 Google Docs 的 documentURL。若缺少凭证,请引导用户先到对应平台申请 API Key 或完成 OAuth 授权。
AI Agent 的 System Message 决定输出格式;务必完整复制,不要省略 Markdown 模板部分。Google Docs 的 documentURL 必须填写完整链接,否则更新会失败。
来源
🧠 AI blog post journalist (Perplexity for research, Anthropic Claude for blog) · marconi · n8n.io · 2025-06-24
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。