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

Telegram 文章自动转 LinkedIn 帖子:n8n + GPT-4 + Google Sheets 模板

输入 Telegram 文章链接 → AI 提取摘要与洞察 → 存入 Google Sheets → 发送 'generate' 生成 LinkedIn 帖子 → Telegram 回传

有一点经验步骤流程提示词贴士
给谁
内容创作者、营销人员、创始人,希望持续输出 LinkedIn 内容但不想手动分析文章和撰写草稿
你会得到
通过 Telegram 机器人收集文章链接,自动分析摘要后存入 Google Sheets;输入 'generate' 即可按需生成 LinkedIn 风格帖子并回传至 Telegram
你需要
n8n · telegram · google-sheets

硬约束

需要 n8n 实例(自托管或云版);Telegram Bot API token;OpenAI API key;Google Sheets OAuth2 授权;Google Sheets 需预置 Date、Title、Link、Summary、Insights Commentary 五列。默认模型 gpt-4.1-mini,可在节点中切换为 gpt-4o、gpt-4o-mini 等。

他们做了什么

dilldawn 在 n8n 官方模板库发布了该 workflow 模板。模板展示了一个双分支自动化流程:用户通过 Telegram 机器人发送文章链接时,workflow 触发 AI Agent(Content collector)分析文章,提取标题、链接、摘要和洞察评论,经正则解析(Edit Fields)后存入 Google Sheets,同时将摘要回传 Telegram;用户发送 'generate' 时,另一分支触发 AI Agent(Generate LinkedIn Post)读取 Google Sheets 中的最新文章数据,生成 LinkedIn 风格帖子并回传 Telegram。模板默认使用 gpt-4.1-mini,支持切换其他 OpenAI 模型。

效果如何

作者报告(author_report)该模板适用于创作者、营销人员和创始人,可在手机上通过 Telegram 完成从收集到生成的完整内容管道。模板在 n8n.io 上获得 711 次查看。本站未实测导入与运行,未验证实际 AI 输出质量与 Google Sheets 写入稳定性。

值得知道

1. 提示词残留:Content collector 和 Generate LinkedIn Post 的 systemMessage 中多次出现 'Airtable' 和 'Demandbox' 品牌名,但实际数据流向为 Google Sheets;用户必须自行替换这些示例内容,否则 AI 可能输出错误的品牌引用。2. 去重机制:Content collector 的 LIMITATIONS 中声明若文章已记录则回复 'You already shared this with me...',但实际依赖 AI 自行判断,未与 Google Sheets 做硬校验。3. 选择逻辑:Generate LinkedIn Post 默认基于最新文章生成,但模板说明提示可在节点中自定义为 random、oldest-first、specific tone 等逻辑;具体实现需用户自行调整 Get row(s) in sheet 的查询参数。4. 模型费用:默认 gpt-4.1-mini 成本较低,若切换至 gpt-4o 或 gpt-4 需注意 Token 消耗与 API 费用。5. 隐私:Telegram 消息内容将经过 OpenAI API,敏感链接不建议发送。

n8n 工作流模板

结构已检查 · 未实际运行

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

配置与测试清单

需要绑定的凭证

  • Telegram Trigger 节点:绑定Telegram API 凭证。
  • Send a text message 节点:绑定Telegram API 凭证。
  • Append row in sheet 节点:绑定Google Sheets OAuth2 凭证。
  • Get row(s) in sheet in Google Sheets 节点:绑定Google Sheets OAuth2 凭证。
  • The post 节点:绑定Telegram API 凭证。
  • OpenAI Chat Model 节点:绑定OpenAI API 凭证。
  • OpenAI Chat Model1 节点:绑定OpenAI API 凭证。

需要替换的配置

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

测试输入与预期结果

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

模板处理说明

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

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

步骤

  1. 创建 Telegram 机器人并获取 token

    在 Telegram 中搜索 @BotFather,按提示创建新机器人,复制获得的 API token。进入 n8n 的 Telegram Trigger 节点,在 Credentials 中选择或新建 telegramApi 凭证,填入该 token。确保机器人有接收消息的权限。

  2. 配置 OpenAI 与 Google Sheets 凭证

    在 n8n Credentials 中分别添加:OpenAI API key(openAiApi);Google Sheets OAuth2 授权(googleSheetsOAuth2Api),按流程完成 Google 账号授权。在 AI Agent 节点(Content collector、Generate LinkedIn Post)的 Language Model 连接中选择已配置的 OpenAI Chat Model。

  3. 准备 Google Sheets 并确认列结构

    创建或打开一个 Google Sheets,确保包含以下列:Date、Title、Link、Summary、Insights Commentary。在 Append row in sheet 节点中,选择已授权的 Google 账号,指定 documentId 和 sheetName。模板假设这些列已存在,可自定义增删列。

  4. 导入 workflow 并检查节点连接

    从 n8n 模板库导入 workflow(或粘贴 workflow JSON)。检查主链路:Telegram Trigger → article or generate?(IF 分支)→ Set Field → Content collector → Edit Fields → Clean Code → Append row in sheet → Send a text message。'generate' 分支:If generate → Generate LinkedIn Post → The post。确认 OpenAI Chat Model 已连接到两个 AI Agent 节点的 ai_languageModel 接口;Get row(s) in sheet in Google Sheets 已连接到 Generate LinkedIn Post 的 ai_tool 接口。

  5. 自定义 AI 提示词(关键:替换品牌与风格)

    进入 Content collector 节点的 options.systemMessage,将其中 'Demandbox' 示例替换为自己的品牌或身份,调整 ROLE、CAPABILITIES、INPUT HANDLING 中的领域关键词(当前聚焦 AI automations、operations、technology)。进入 Generate LinkedIn Post 节点的 options.systemMessage,同样替换 'Demandbox' 示例,调整 voice、length、CTA、hashtags 以匹配个人风格。两个节点的 user prompt 分别保持默认即可,也可按需修改。

    运行提示词 · 来源原文。Content collector AI Agent 节点的 options.systemMessage 字段

    =Today is: {{ $now.format('yyyy-MM-dd') }}
    Article link: {{ $json.chatInput }}
    
    ROLE: 
    You are a sharp research and insight assistant. Your mission is to analyze articles and content shared by user through Telegram, focusing on AI automations and workflows, AI trends, operations, sports, and technology. Your task is to summarize these articles and extract meaningful insights for a tech-savvy audience. Store your summaries and recommendations in an Airtable.
    
    Infuse user’s voice: a blend of formal, direct, and witty. Avoid being too serious and maintain a tone that is professional yet engaging. Incorporate user's style by creating thought-provoking summaries that encourage readers to think and consider changing their current practices.
    
    CAPABILITIES:
    
    - Receive articles from user via Telegram.
    - Access, read, and interpret the full content of each article.
    - Identify key points, themes, and innovations relevant to AI, operations, and technology.
    - Provide concise, insightful summaries in a formal, direct, and witty tone.
    - Add user’s perspective and commentary, using a style that is short, to the point, and avoids unnecessary seriousness.
    - Log the summaries and insights into Airtable with fields: Title, Link, Summary, Insight & Commentary.
    
    INPUT HANDLING:
    
    - Upon receiving a link:
      - Visit the page and read the full article.
      - Extract the article’s title and URL.
      - Write a concise summary, focusing on AI automation, efficiency, and innovation.
      - Under "Insight & Commentary," provide a witty analysis reflective of user’s style and perspective.
    
    - If given text without a link:
      - Use the entire text as the Title.
      - Write a summary of the main ideas.
      - Provide commentary that ties back to user’s core themes and perspectives.
    
    RESPONSE GUIDELINES:
    
    - Be concise, direct, and insightful.
    - Maintain a thought-leadership tone: confident and witty.
    - Focus on solutions, innovation, and efficiency.
    - Avoid politics and overly serious topics.
    
    LIMITATIONS:
    
    - If the article is inaccessible, note this clearly in the Summary field.
    - If the article is already logged (duplicate), reply with “You already shared this with me, please send a different one.”
    - Skip irrelevant content and avoid repeating the same commentary across entries.
    - Do not delve into politics or overly serious personal subjects.
    
    EXAMPLE OUTPUT:
    
    Title: "AI Trends Transforming Operations in 2023"
    
    Link: https://example.com/ai-trends-2023
    
    Summary: The article explores how AI trends, including automated workflows and intelligent systems, are revolutionizing operational efficiency across industries. Key innovations include predictive analytics for decision-making and AI-driven process automation to reduce manual tasks.
    
    Insight & Commentary: "Imagine your workflow humming along like a well-oiled machine, where AI takes the mundane off your plate. That's not just the future—it's happening now. Embrace these trends or risk being left behind. At Demandbox, we believe efficiency isn't just about doing things faster; it's about doing them smarter. Let's lead this change."

    运行提示词 · 来源原文。Generate LinkedIn Post AI Agent 节点的 options.systemMessage 字段

    =ROLE: 
    You are a LinkedIn content assistan. Your mission is to transform insights from user's curated summaries into three original LinkedIn posts each week. Craft posts that are educational, engaging, and reflect user’s voice and vision on AI automations, workflows, and technological innovation.
    
    user’s style is formal, direct, and witty—short and to the point. Posts should provoke thought and encourage change without being overly serious.
    
    CAPABILITIES:
    - When asked to generate a LinkedIn post, review the recent articles in the AirTable and generate the post. 
    - Scan the Airtable for unused insights and summaries.
    - Evaluate entries to determine their potential to resonate with a tech-savvy audience.
    - Generate three different LinkedIn posts weekly, grounded in user’s style and voice.
    - Ensure posts align with themes of AI trends, operations, and technology while being thought-leadership focused.
    - Flag used content to prevent duplication.
    
    INPUT HANDLING:
    
    - Identify new content: Query Airtable for unused summaries. If none are available, find recent articles related to user’s themes.
    - Select compelling topics based on novelty and relevance.
    - Compose three posts per week:
      - Start with an engaging hook.
      - Develop the core argument in concise paragraphs.
      - Incorporate user’s beliefs and encourage readers to think differently.
      - End with a thought-provoking statement or call to action.
    
    RESPONSE GUIDELINES:
    
    - Voice: Write in the first person as user ("I"/"we"). Maintain a confident, direct tone with a touch of wit.
    - Length: Aim for ~150–250 words per post. Use short sentences and paragraphs for clarity.
    - Content: Focus on AI, technology, and operations. Avoid politics and overly serious topics.
    - Accuracy: Never invent facts. Use reputable sources for supporting data. If data is uncertain, omit it.
    
    LIMITATIONS:
    - Before you generate the LinkedIn post, you MUST check first "the rules tool" and take into consideration everything is written inside, those are your do and don't guideliness for you to keep in mind. 
    - Do not reuse content already posted on LinkedIn.
    - Avoid personal anecdotes and politics.
    - If Airtable has no new entries, inform user and suggest searching for fresh articles.
    
    EXAMPLE OUTPUT:
    
    Post 1: 
    "AI automations are not just a trend—they're a necessity. In 2023, businesses that leverage AI to enhance operations will lead the pack. At Demandbox, we see AI as the key to unlocking unprecedented efficiencies. It's time to rethink how we work—let's innovate, optimize, and transform."
    
    Post 2: 
    "Imagine a world where operations run smoothly, effortlessly—powered by AI. That's the future we're building at Demandbox. By automating workflows, we're freeing up time for what truly matters: innovation. How are you using AI to reshape your operations?"
    
    Post 3: 
    "Efficiency and innovation go hand in hand. As we embrace AI trends, let's focus on improving the way we work. At Demandbox, we're committed to making tech more than just a tool—it's a game-changer. Join us as we redefine efficiency in the tech world."
  6. 测试文章收集链路

    在 Telegram 中向机器人发送一篇文章链接(含 https://)。观察 n8n execution 是否成功触发:Telegram Trigger → article or generate?(匹配 https:// 分支)→ Content collector 调用 AI 分析 → Edit Fields 正则提取 Title/Link/Summary/Insight & Commentary → Clean Code → Append row in sheet 写入 Google Sheets → Send a text message 将 Summary 回传至 Telegram。检查 Google Sheets 中是否新增一行正确数据。

    运行提示词 · 来源原文。Content collector AI Agent 节点的 text 字段(user prompt)

    =Read the article {{ $json.chatInput }} and do as requiered by your role

    运行提示词 · 来源原文。Send a text message 节点的 text 字段

    ={{ $('Edit Fields').item.json.Summary }}
  7. 测试 generate 指令生成 LinkedIn 帖子

    在 Telegram 中向机器人发送文字 'generate'。观察 workflow 走向:Telegram Trigger → article or generate?(不匹配 https://,进入第二分支)→ If generate(匹配 'generate')→ Generate LinkedIn Post 调用 AI,结合 Get row(s) in sheet 获取的最新文章数据生成帖子 → The post 将结果回传至 Telegram。确认收到的帖子格式符合预期,可复制至 LinkedIn 发布。

    运行提示词 · 来源原文。Generate LinkedIn Post AI Agent 节点的 text 字段(user prompt)

    Using the information you have, create a well written viral LinkedIn post

可复制提示词

搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限,再按步骤配置节点

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

你正在搭建一个 n8n workflow:通过 Telegram 收集文章链接,由 AI 分析摘要后存入 Google Sheets,再按需生成 LinkedIn 帖子。请先确认你已具备:n8n 实例访问权限、Telegram Bot token、OpenAI API key、Google Sheets OAuth2 授权。然后按步骤检查节点连接,特别注意将两个 AI Agent 节点中的 'Demandbox' 品牌示例替换为你自己的身份与风格。

搭建完成后,先用一条真实文章链接测试完整链路,再用 'generate' 测试帖子生成。若 AI 输出不符合预期,优先检查 systemMessage 中的风格定义与示例输出。

来源

Article to LinkedIn post generator with Telegram, GPT-4 & Google Sheets · dilldawn · n8n.io · 2025-11-27

留言与反馈

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

正在加载…

    相关用例