用 n8n 把任意网页转成 LinkedIn 帖子与 AI 配图
输入网页 URL → Airtop 抓取 → OpenAI 生成帖子与图片提示词 → Slack 审核 → 输出可发布的帖子与品牌图
- 给谁
- 内容运营、社交媒体经理、需要快速将博客或产品页转为 LinkedIn 内容的团队
- 你会得到
- 提交网页链接后,自动获得一篇 LinkedIn 优化帖子和一张品牌风格配图,经 Slack 审核后即可发布
硬约束
需要:n8n 实例(自托管或云版)、Airtop API key、OpenAI API key、Slack OAuth 应用并授权到审核频道。另需一个独立的子工作流负责品牌图片生成(模板引用 workflowId: hYnqsBhAjnEFvKSk)。费用取决于各 API 调用量;来源未提供具体定价。
他们做了什么
来源模板展示了在 n8n 中搭建的完整工作流:用户通过表单提交网页 URL 和可选指令,Airtop 抓取页面内容,OpenAI 生成 LinkedIn 帖子,另一个 OpenAI 节点将帖子转化为图片提示词,再通过 Execute Workflow 节点调用子工作流生成品牌图片。帖子和图片分别经 Slack sendAndWait 节点进行人工审核,审核回复由 Text Classifier 节点自动分类为 Edit/Approved/Declined,修订请求触发自动重新生成循环,最终批准的版本发送到 Slack 频道。模板还包含一个独立的表单入口,允许用户直接输入已有帖子文本仅生成配图。
效果如何
来源报告该模板可实现:输入网页 URL 后自动生成 LinkedIn 优化帖子和品牌风格配图,通过 Slack 完成审核与修订循环,最终输出可发布内容(author_report)。本站未实际导入运行,未验证各节点在特定凭证配置下的稳定性。
值得知道
1. 核心图片生成依赖外部子工作流(workflowId: hYnqsBhAjnEFvKSk),模板本身不包含该子工作流的完整实现,需单独准备或搭建。2. OpenAI 节点使用了特定的 Assistant ID(asst_aYEHuzWeFxMBN2qu4FnXRsJ4),复现时需要创建或替换为自己的 Assistant。3. Slack 频道 ID(C08QUB9N5FX)为模板硬编码,需替换为实际频道。4. 审核等待时间设为3天,超期后工作流可能异常终止,需根据团队节奏调整。5. 分类器节点使用 gpt-4.1 作为语言模型,费用随审核轮次增加。6. 来源未提供 ROI 数据或实际运行成功率。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- OpenAI Chat Model 节点:绑定OpenAI API 凭证。
- Image Prompt Generator 节点:绑定OpenAI API 凭证。
- OpenAI Chat Model1 节点:绑定OpenAI API 凭证。
- Final Version 节点:绑定Slack OAuth2 凭证。
- Human Revision of Text 节点:绑定Slack OAuth2 凭证。
- Human Review of Visual 节点:绑定Slack OAuth2 凭证。
- Generate Post Text 节点:绑定OpenAI API 凭证。
- Get Page 节点:绑定airtopApi 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #5774(约 25 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-24
步骤
配置触发器与凭证
在 n8n 中导入模板后,先配置三个凭证:Airtop API(airtopApi)、OpenAI API(openAiApi)、Slack OAuth2(slackOAuth2Api)。然后检查表单触发器节点 'On form submission':表单标题为 'LinkedIn Post Generator',字段包含必填的 'Page URL' 和可选的 'Instructions'(多行文本)。第二个表单触发器 'Generate Image' 用于仅生成图片的场景,字段为必填的 'Post'。
抓取网页内容
工作流由表单提交触发后,'Get Page' 节点使用 Airtop 以新会话模式抓取指定 URL 的页面内容。该节点输出 modelResponse.scrapedContent.text,供后续生成帖子使用。确保 Airtop 凭证已正确配置且目标页面可公开访问。
生成 LinkedIn 帖子文本
'Set Params' 节点将表单输入整理为 URL、Instructions、Post(初始为'-')和 Webpage_content。随后 'Generate Post Text' 节点调用 OpenAI Assistant(asst_aYEHuzWeFxMBN2qu4FnXRsJ4,Social Media Writer),将 Instructions、Post 和 Webpage_content 传入,生成 LinkedIn 优化帖子。
运行提示词 · 来源原文。OpenAI 节点 'Generate Post Text' 的 text 参数;需替换 n8n 表达式变量后执行
=Write a helpful educational, and engaging LinkedIn posts based on a webpage scraped content below or the Post text below and according to the instructions provided by the user. Instructions: {{ $json.Instructions }} {{ $json.Post }} {{ $json.Webpage_content }}生成图片提示词
帖子文本经 'Set Post' 整理后,进入 'Image Prompt Generator' 节点。该节点同样调用 OpenAI Assistant,使用专门的系统提示词将 LinkedIn 帖子转化为用于文本生成图片模型的营销风格视觉提示词。输出仅包含最终图片提示词,不含引号或额外解释。
运行提示词 · 来源原文。OpenAI 节点 'Image Prompt Generator' 的 text 参数;需替换 n8n 表达式变量后执行
=# Overview You are an AI agent that transforms LinkedIn posts into visual prompt descriptions for generating graphic marketing materials. These visuals are designed to be paired with the post on LinkedIn, helping communicate the message in a visually engaging, brand-aligned way. ## Objective: - Read and analyze the given LinkedIn post. - If Image Prompt and User Instructions are provided. Follow the user instructions closely and modify the image prompt based on those instructions - Identify the main message, insight, or takeaway from the post. - Create a clear and compelling graphic prompt that can be used with a text-to-image generator. - The result should be a marketing-style graphic — not a literal scene or hyperrealistic photo — that: 1) Visually supports or illustrates the key idea of the post 2) Looks appropriate for use in a professional LinkedIn feed 3) Feels polished, modern, and engaging 4) Don't be salesy, Don't say things like "Save hours weekly — Grab Your Free Template!”. be more technical, focus on how it works ## Output Instructions: - Output only the final image prompt. Do not output quotation marks. - Do not repeat or rephrase the LinkedIn post. - Do not add any explanations or extra content — just the image prompt. - Never leave things blank like "Header area reserved for customizable callout text" - Output numeric stats when available in the original post ## Style Guidelines: - Think like a brand designer or marketing creative. - Visuals may include: text, charts, icons, abstract shapes, overlays, modern illustrations, motion-like effects, bold typography elements (described, not rendered), or metaphorical concepts. - You can mention layout suggestions (e.g., "split screen design," "header with bold title and subtle background illustration"). - Assume the output will be generated using AI image tools — your prompt should guide those tools effectively. - When the post is a template giveaway, add small, gentle "free template" stamp ## Example Prompt Format: A modern flat-style graphic showing a human brain connected to mechanical gears, representing the fusion of AI and automation. Minimalist background, soft gradients, clean sans-serif text placement space at the top. # LINKEDIN POST: {{ $json.Post }} # LATEST IMAGE PROMPT {{ $json.Image_prompt }} # USER IMAGE INSTRUCTIONS {{ $json.Image_user_instructions }}Slack 文本审核与修订循环
'Set Post' 将生成的帖子发送到 'Human Revision of Text' Slack 节点,使用 sendAndWait 操作在频道 gen-social-posts(C08QUB9N5FX)中等待人工反馈,限时3天。用户回复经 'Check Post Text Feedback' 分类器(gpt-4.1 驱动)判断为 Edit、Approved 或 Declined。若为 Edit,'Set Post1' 将修订意见与原文合并,重新传入 'Generate Post Text' 生成新版本;若 Approved 则进入图片生成流程;Declined 则终止。
生成品牌图片与 Slack 图片审核
'Set Image Prompt1' 整理图片提示词后,'Generate on-brand image' 节点调用子工作流(workflowId: hYnqsBhAjnEFvKSk,AIRTOP — Generate and Edit On-Brand Images - V3),传入 Prompt 和 Image_drive_id 生成品牌图片。子工作流返回 Branded_view_url 后,'Human Review of Visual' Slack 节点发送帖子、图片提示词和图片供审核,同样限时3天。用户回复经 'Check Image Feedback' 分类器判断。若 Edit,'Set Image Prompt2' 将原始提示词与用户修订请求合并,重新生成图片;Approved 则进入最终发布;Declined 终止。
最终发布到 Slack
文本和图片均获批准后,'Final Version' Slack 节点将最终帖子和品牌图片 URL 发送到 gen-social-posts 频道。消息格式包含 'FINAL POST AND VISUAL' 标题、帖子正文和图片链接。unfurl_links 和 unfurl_media 设为 false 以避免展开预览。
运行提示词 · 来源原文。Slack 节点 'Final Version' 的 text 参数;需替换 n8n 表达式变量后执行
=---------------- FINAL POST AND VISUAL {{ $('Set Image Prompt').item.json.Post }} {{ $('Generate on-brand image').item.json.Branded_view_url[0] }}
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你正在协助复现 n8n 模板 #5774:将网页转为 LinkedIn 帖子与 AI 配图。请先确认已准备好 n8n 实例、Airtop API key、OpenAI API key、Slack OAuth 应用,以及独立的品牌图片生成子工作流。然后按上述步骤检查各节点配置,特别是表单字段、凭证绑定、OpenAI Assistant ID 和 Slack 频道 ID。建议先用一个公开博客 URL 测试完整流程,观察 Slack 审核消息是否正确送达。
搭建前请确认子工作流 'AIRTOP — Generate and Edit On-Brand Images - V3' 已存在并可用;该模板依赖此子工作流完成实际图片渲染。
来源
Generate LinkedIn posts and AI images from web pages with Airtop and GPT-4 · cesar-at-airtop · n8n.io · 2025-07-08
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。