用 Tally 简报 + OpenAI 三阶 Agent 自动生成 Google Docs 博客草稿
Tally 表单采集内容简报 → n8n 三阶 AI Agent 解析/大纲/扩写 → Google Docs 输出可编辑草稿
- 给谁
- 内容营销团队、自由撰稿人、SEO 团队、代理机构内容部门、创始人/个体创业者
- 你会得到
- 填写 Tally 简报后,自动在 Google Drive 生成一篇带标题和正文的博客草稿文档
- 你需要
- n8n · tally · google-docs
硬约束
前置条件:可访问的 n8n 实例;Tally 账户与 API 密钥;OpenAI API 密钥;Google 账户及 OAuth2 凭证授权。费用:按来源作者估算,每篇草稿约 3 次 API 调用,约 $0.01–0.03。
他们做了什么
作者创建了一个 n8n 模板,将 Tally 表单作为内容简报入口,串联三个 OpenAI Agent 节点(解析简报→生成大纲→扩写全文),并通过两个 Code 节点清洗 AI 输出,最终自动创建 Google Doc。模板在 n8n.io 发布,包含完整 workflow.json、节点参数及 sticky note 说明。
效果如何
作者报告称该工作流可帮助营销团队在一分钟内从简报生成博客草稿(来源:author_report)。每篇草稿约需 3 次 API 调用,估算成本 $0.01–0.03。
值得知道
GPT-5.4 为较新型号,实际可用性取决于 OpenAI 账户权限与地区;若不可用,需在 n8n 中更换为其他支持模型。输出默认为 HTML 格式,若需 Markdown 需修改 Agent 3 的 systemMessage。Tally 的条件逻辑可基于复选框显示/隐藏竞品 URL 字段。Google Docs 节点默认保存到 Drive 根目录,未在模板中展示如何指定子文件夹。本站未执行实际导入与运行验证。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- GPT-5.4 Model 节点:绑定OpenAI API 凭证。
- GPT-5.4 Model 2 节点:绑定OpenAI API 凭证。
- GPT-5.4 Model 3 节点:绑定OpenAI API 凭证。
- Tally Trigger 节点:绑定tallyApi 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #15058(约 16 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-25
步骤
导入工作流并配置凭证与表单
在 n8n 模板页导入此工作流。在 Credentials 中依次添加:Tally API 密钥(Tally > Settings > Integrations > API)、OpenAI API 密钥、Google Docs OAuth2 凭证(需与目标 Drive 同一账户)。在 Tally 创建内容简报表单,字段包括:Blog Topic(短文本)、Target Audience(短文本)、Tone(下拉:Professional / Casual / Technical / Conversational)、Target Keywords(长文本或标签)、Desired CTA(短文本)、Competitor URLs(长文本,可选)。在 Tally Trigger 节点选择该表单。
解析简报
Tally Trigger 在表单提交时触发。Agent 1(Parse Content Brief)接收原始 Tally JSON,提取并清洗为结构化字段。随后 Code 节点(Parse Brief Fields)清理 AI 输出中的 markdown 代码块,解析为 JSON;若解析失败则返回带 parse_error 的回退对象,避免中断下游。
运行提示词 · 来源原文。Parse Content Brief 节点的 text 字段(用户提示词)
=Extract and clean the content brief from this Tally submission: {{ JSON.stringify($json) }} Return a JSON object with: topic (string), target_audience (string), tone (string), keywords (array of strings), cta (string), competitor_urls (array of strings), submission_id (string).运行提示词 · 来源原文。Parse Content Brief 节点的 systemMessage 字段
You are a data extraction agent. Parse Tally form JSON into structured content brief fields. CRITICAL: Return ONLY a raw JSON object. No markdown fences, no explanation. OUTPUT SCHEMA: {"topic": "string", "target_audience": "string", "tone": "string", "keywords": ["string"], "cta": "string", "competitor_urls": ["string"], "submission_id": "string"}生成大纲
Agent 2(Build Blog Outline)根据清洗后的简报字段生成博客大纲,含标题、各节标题及每节 3–5 个要点。若提供竞品 URL,大纲会参考其内容角度并补充额外价值。随后 Code 节点(Parse Outline)再次清洗 AI 输出并合并回简报数据;解析失败时以 topic 为标题、空章节回退。
运行提示词 · 来源原文。Build Blog Outline 节点的 text 字段(用户提示词)
=Create a detailed blog post outline for the following brief: Topic: {{ $json.topic }} Target audience: {{ $json.target_audience }} Tone: {{ $json.tone }} Keywords to include: {{ ($json.keywords || []).join(', ') }} Desired CTA: {{ $json.cta }} Competitor URLs to reference: {{ ($json.competitor_urls || []).join(', ') }} If competitor URLs are provided, factor their content angles into the outline so the post covers what they cover plus additional value. Return a JSON object with: title (suggested post title), sections (array of objects each with heading and bullet_points array), estimated_word_count (number).运行提示词 · 来源原文。Build Blog Outline 节点的 systemMessage 字段
You are a content strategist who builds well-structured blog outlines. Each section should have 3-5 bullet points that the writer will expand. CRITICAL: Return ONLY a raw JSON object. No markdown fences, no explanation. OUTPUT SCHEMA: {"title": "string", "sections": [{"heading": "string", "bullet_points": ["string"]}], "estimated_word_count": 1200}扩写全文
Agent 3(Write Full Draft)根据大纲和简报字段扩写完整博客草稿,包含引言、正文各节、结论和 CTA,使用指定语气。输出格式为 HTML(h2 标题、strong 粗体、ul/li 列表、p 段落),不使用 Markdown 符号。
运行提示词 · 来源原文。Write Full Draft 节点的 text 字段(用户提示词)
=Write a complete blog post draft based on this outline and brief: Title: {{ $json.outline_title }} Tone: {{ $json.tone }} Target audience: {{ $json.target_audience }} Keywords: {{ ($json.keywords || []).join(', ') }} CTA: {{ $json.cta }} Competitor URLs referenced: {{ ($json.competitor_urls || []).join(', ') }} Outline sections: {{ JSON.stringify($json.outline_sections || []) }} If competitor URLs were provided, ensure the draft adds unique value beyond what competitors cover. Return a JSON object with: title (string), body (full blog post in markdown, including all sections expanded from the outline, ending with the CTA).运行提示词 · 来源原文。Write Full Draft 节点的 systemMessage 字段
You are an expert blog writer. Expand the provided outline into a complete, engaging blog post. Write in the specified tone. FORMATTING RULES: Use HTML tags for all formatting. Use <h2> for all section headings. Use <b> or <strong> for bold text. Use <ul> and <li> for bullet points. Use <p> for paragraphs. DO NOT use Markdown symbols like ## or **. End with a clear CTA paragraph. CRITICAL: Return ONLY a raw JSON object. No outer markdown fences. OUTPUT SCHEMA: > { "title": "string", "body": "full HTML blog post as a string" }格式化文档内容
Prepare Doc Content 节点(Code)将 Agent 3 的 HTML 输出解析为 JSON,去除 HTML 标签并转换为纯文本:br 转换行、p 结尾转双换行、li 结尾转换行,最终提取 clean_title 和 clean_body,删除原始 output 字段避免下游混淆。若解析失败则记录 error。
创建并写入 Google Doc
Create Google Doc 节点使用 clean_title 在 Drive 根目录(folderId='default')创建新文档。Update Google Doc 节点将 clean_body 插入文档正文。完成后可在 Google Drive 查看草稿。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限,再按步骤核对节点配置
这一段是提示词,页面不会在这里插入广告。
你正在协助复现一个 n8n 工作流:从 Tally 表单自动采集内容简报,经三阶 OpenAI Agent 生成博客大纲与全文,最终输出到 Google Docs。请先确认以下信息是否齐全: 1) n8n 实例访问权限;2) Tally API 密钥与已创建的表单;3) OpenAI API 密钥;4) Google OAuth2 凭证与目标 Drive 账户;5) 是否已导入 workflow.json。确认后按步骤逐一检查节点配置,特别是三个 Agent 的 systemMessage 与模型选择(gpt-5.4)。
搭建前请确认 Tally 表单字段与模板一致,并测试一次表单提交以验证 webhook 触发。
来源
Generate blog drafts from Tally content briefs with OpenAI and Google Docs · yaron-nofluff · n8n.io · 2026-04-15
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。