ChatGPT创意写作AI 评分 · 待评分AI 辅助编辑·未发现明显提示词注入风险n8n.io

用 Perplexity 研究自动生成 SEO 优化的 WordPress 博客文章

输入研究主题 → Perplexity 调研 + AI 写作 → 输出带格式的 WordPress 草稿与 Telegram 通知

有一点经验步骤流程提示词贴士
给谁
内容创作者、营销人员、需要批量发布 SEO 博客的 WordPress 站长
你会得到
提交一个研究查询后,自动获得一篇含标题、Slug、Meta 描述、HTML 正文和特色图片的 WordPress 草稿,并收到 Telegram 完成通知
你需要
n8n · wordpress · perplexity · telegram

硬约束

在 n8n 中导入模板,配置 WordPress、OpenAI、Perplexity AI 和 Telegram 四类凭证,通过表单触发器提交研究主题,工作流自动执行研究、写作、格式化、发布和通知。需要替换硬编码的 WordPress 站点地址和图片 URL。

他们做了什么

模板作者 Joseph LePage 创建了一个 n8n 工作流模板,将表单触发器、Perplexity AI 研究、OpenAI 内容生成、WordPress 发布和 Telegram 通知串联为自动化博客生产流程。该模板发布于 n8n.io 模板库,ID 3291。

效果如何

模板在 n8n.io 获得 73,985 次浏览(author_report)。来源未提供实际运行成功率、生成质量评估或 ROI 数据。

值得知道

1. 提示词硬编码了加拿大 AI 咨询公司定位(SocialFind、recruitment/HR 关键词),必须按实际业务重写;2. WordPress 站点和图片 URL 均为示例硬编码,未替换会导致发布到错误站点或使用无关图片;3. Perplexity 节点使用 httpHeaderAuth 凭证类型,需确认 API Key 格式为 Bearer Token;4. 作者 ID 固定为 2,需匹配目标 WordPress 站点实际用户;5. 本站未实测该工作流,reproduction=not_tested

n8n 工作流模板

结构已检查 · 未实际运行

下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。

配置与测试清单

需要绑定的凭证

  • Wordpress 节点:绑定wordpressApi 凭证。
  • OpenAI Chat Model 节点:绑定OpenAI API 凭证。
  • Create HTML 节点:绑定OpenAI API 凭证。
  • Upload Image to Wordpress 节点:绑定wordpressApi 凭证。
  • Set Image on Wordpress Post 节点:绑定wordpressApi 凭证。
  • Perplexity Research 节点:绑定HTTP Header Auth 凭证。
  • Send Success Message to Telegram 节点:绑定Telegram API 凭证。
  • gpt-4o-mini 节点:绑定OpenAI API 凭证。

需要替换的配置

  • 源模板来自 n8n 公开库 #3291(约 25 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
  • Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。

测试输入与预期结果

  • 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
  • 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。

模板处理说明

  • 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
  • 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。

模板获取日期: 2026-10-25

步骤

  1. 通过表单触发器提交研究主题

    在 n8n 中启用「On form submission」节点,访问表单 URL,在「Research Query」字段输入想研究的主题(例如行业趋势或招聘挑战)。该字段为必填文本域。

  2. Perplexity AI 执行研究

    工作流自动调用 Perplexity AI API(模型 sonar-pro),以专业新闻研究员身份搜索并返回该主题的详细摘要及来源引用。需在凭证中配置 httpHeaderAuth(Perplexity API Key)。

    运行提示词 · 来源原文。Perplexity Research 节点的 system message

    Act as a professional news researcher who is capable of finding detailed summaries about a news topic from highly reputable sources.

    运行提示词 · 来源原文。Perplexity Research 节点的 user message

    Research the following topic and return everything you can find about: '{{ $json['Research Query'] }}'.
  3. 清理引用链接

    通过 Set 节点将 Perplexity 返回的引用标记 [1]-[10] 替换为完整来源 URL,生成带出处标注的研究文本,供后续写作节点使用。

  4. AI 撰稿人生成博客正文

    Copywriter AI Agent 节点(连接 gpt-4o-mini)根据研究内容和查询主题撰写 1500-2000 字的 SEO 博客正文。提示词中预设了加拿大 AI 咨询公司的角色定位,用户需根据自身业务修改。

    运行提示词 · 来源原文。Copywriter AI Agent 节点的 text 参数(promptType=define)

    =You are part of a marketing team that creates high-quality blog posts for the AI consulting and workflow automation industry based in Canada. Your goal is to produce engaging, SEO-optimized content that positions the company as an authority in the AI consulting industry and attracts inbound leads.
    
    Every 2 days, your team posts a blog on the most trending topics in AI consulting and n8n workflows. As the copywriter, you are provided with the following information:
    
    - Query: The main topic for this week's blog post, representing the most trending news in the recruitment space.
    
    - Other keywords: A list of high-search-volume keywords related to AI consulting and n8n workflows. Incorporate these naturally into the blog post where relevant, without forcing them or changing the post's meaning.
    
    - Research findings: Detailed information from reputable sources related to the blog topic. Your post must be based on this research.
    
    Given this information, write a comprehensive blog post that:
    
    - Includes the query in the blog title, H2 header, and early in the introduction.
    - Incorporates all details from the research findings, including source URLs for potential hyperlinks.
    - Is detailed and informative, showcasing the companies expertise in AI consulting and n8n workflows to automate business processes.
    - Uses a professional yet engaging tone, highlighting the exciting developments and challenges in the recruitment industry.
    - Flows naturally and logically, making it easy for readers to follow.
    - Is between 1500 to 2000 words long.
    - Is written at a level accessible to HR professionals and business leaders.
    
    Additional requirements:
    - Include practical takeaways or actionable advice for recruiters and HR professionals.
    - Highlight how the topic relates to the companies services or expertise.
    - Include a call-to-action (CTA) that encourages readers to explore the comapnies services or contact for more information.
    
    Create the entire blog post draft in your first output. Don't stop or cut it short.
    
    Your output must be the blog post and nothing else.
    
    Here are the details of this blog post project:
    
    Query:
    {{ $('On form submission').item.json['Research Query'] }}
    
    Detailed Research:
    {{ $('Cleanup Links').item.json.research }}
  5. 生成 WordPress 兼容 HTML

    Create HTML 节点(OpenAI,gpt-4o-mini)将博客正文转换为 WordPress 兼容 HTML,包含阅读时间、要点摘要、目录、正文和 FAQ,并应用指定样式(蓝色链接 #00c2ff、标题下边框等)。

    运行提示词 · 来源原文。Create HTML 节点的 messages.values[0].content

    =Only output the HTML content without preamble or further explanation. Generate WordPress-compatible HTML for a blog post based on the provided content.
    
    ### CONTENT PROCESSING:
    - Process all content from {{ $json.output }}
    - Preserve all original facts, information, and URLs
    - Format according to the specifications below
    
    ### REQUIRED STRUCTURE (IN THIS ORDER):
    1. Title (H2)
    2. Estimated reading time
    3. Key takeaways (3-5 bullet points)
    4. Table of contents (linked to all headings)
    5. Main content (with proper heading hierarchy)
    6. FAQ section
    
    ### STYLING REQUIREMENTS:
    - Style Override: Include a style section with !important declarations
    - Links: All hyperlinks, TOC items, and FAQ questions must be #00c2ff (blue)
    - Headings: All headings need a bottom border in #00c2ff with padding
    - Spacing: Add <br><br> between each major section
    
    ### ENGAGEMENT FORMATTING:
    - Use bold, italics, bullet points, quotes, and highlighting for emphasis
    - Create proper paragraph structure with appropriate line breaks
    - NO emojis allowed
    - Use whitespace strategically for readability
    
    ### HYPERLINK HANDLING (CRITICAL):
    - When URLs appear next to keyphrases (e.g., "AI tools (https://example.com)")
    - Convert to: <a href="https://example.com" style="color: #00c2ff !important;">AI tools</a>
    - The KEYPHRASE must be linked, never the URL itself
    
    ### WORDPRESS COMPATIBILITY:
    - Use WordPress block classes (wp-block-heading, wp-block-paragraph, etc.)
    - Add heading IDs starting with "h-" for better TOC linking
    - Ensure all styles use !important to override theme styles
    
    DO NOT include any explanations, code tags, or comments. Output ONLY the raw HTML.
  6. 生成标题、Slug 和 Meta 描述

    Create Title, Slug, Meta 节点(AI Agent,连接 gpt-4o-mini 和 Structured Output Parser)根据博客内容生成 SEO 友好的标题、URL Slug 和 Meta 描述,输出为 JSON 格式。提示词中的关键词方向(recruitment/HR)需按实际业务修改。

    运行提示词 · 来源原文。Create Title, Slug, Meta 节点的 text 参数

    =**Create a slug, blog post title, and meta description for the following blog post:**
    
    {{ $json.output }}
    
    **Slug Guidelines:**
    - Keep it concise (4-5 words maximum).
    - Include the primary keyword related to recruitment or HR.
    - Use hyphens to separate words.
    - Avoid unnecessary words, articles, or prepositions.
    - Ensure it reflects the main topic of the blog post.
    - Make it readable and relevant for both users and search engines.
    
    **Title Guidelines:**
    - Avoid AI words like "Transform" or "Revolutionize" and similar overused terms.
    - Avoid using a colon (:) in the title.
    - Never structure it as a primary/secondary title separated by a colon.
    - Include the primary keyword related to recruitment or HR (e.g., 'AI in recruitment' or 'talent acquisition trends').
    - Clearly inform users what they can expect from reading the blog post.
    - Be concise and engaging, ideally 50-60 characters long.
    - Incorporate power words that appeal to HR professionals and recruiters.
    
    **Meta Description Guidelines:**
    - Avoid AI words like "Transform" or "Revolutionize" and similar overused terms.
    - Be concise: Limit to 150-160 characters to ensure full visibility in search results.
    - Include keywords: Naturally incorporate primary recruitment-related keywords to enhance relevance and visibility.
    - Provide value: Clearly convey the benefits or insights readers will gain from the article.
    - Be engaging: Use action-oriented language or a thought-provoking question to encourage clicks.
    - Align with content: Accurately reflect the blog post's content to meet user expectations and reduce bounce rates.
    - Highlight expertise: Subtly emphasize SocialFind's authority in the recruitment field.
    
    Your output must be a single valid JSON object with these 3 fields:
    -slug: The slug
    -title: The blog post title
    -meta: The meta description  
    
    Each should be presented without any additional text, explanation, quotation marks, or formatting.
  7. 合并博客详情

    Merge 节点汇聚三条分支(HTML 内容、标题/Slug/Meta JSON、原始数据),Aggregate 节点合并为统一数据结构,供 WordPress 节点使用。

  8. 清理 HTML 标记

    Set 节点去除 OpenAI 返回的 ```html 和 ``` 代码块标记,提取纯 HTML 内容。

  9. 发布到 WordPress

    Wordpress 节点使用合并后的标题、Slug、Meta 和 HTML 内容创建草稿文章(status=draft, authorId=2, commentStatus=closed)。需在凭证中配置 wordpressApi,并修改节点中的站点地址(当前硬编码为 commonclone.com)。

  10. 设置特色图片

    工作流通过 Set Image URL 指定图片地址,GET Image 下载图片,HTTP Request 上传到 WordPress 媒体库,再关联到文章作为特色图片。当前模板使用硬编码示例图片 URL,用户需替换为自己的图片源或动态逻辑。

  11. Telegram 发送完成通知

    Telegram 节点向指定 chat 发送成功消息,包含创建时间。需在环境变量中设置 TELEGRAM_CHAT_ID,并配置 telegramApi 凭证。

    运行提示词 · 来源原文。Send Success Message to Telegram 节点的 text 参数

    =Success! Your blog post was created at {{ $now }}

可复制提示词

搭建指导 · 本站建议版本。交给搭建助手,协助用户导入模板并检查配置

这一段是提示词,页面不会在这里插入广告。

你是一个 n8n 工作流搭建助手。用户想复现「用 Perplexity 研究自动生成 SEO 优化的 WordPress 博客文章」模板。请按以下顺序协助:1) 确认用户已有 n8n 实例和四类凭证(WordPress API、OpenAI、Perplexity AI、Telegram);2) 指导导入 workflow.json;3) 逐节点检查需替换的硬编码值(WordPress 站点域名、图片 URL、作者 ID、公司定位提示词);4) 建议先用样例查询测试完整流程。不要直接执行任何 API 调用或发布操作。

替换硬编码域名、图片 URL 和公司定位提示词后再运行

来源

🔍🛠️Generate SEO-optimized WordPress content with AI powered perplexity research · joe · n8n.io · 2025-03-23

留言与反馈

试过这个方法吗?分享效果、遇到的问题或改进建议。留言审核后公开,请勿填写敏感信息。

正在加载…

    相关用例