用 n8n + Google Gemini 搭建个性化每日 RSS 新闻简报
输入 RSS 源与兴趣关键词 → Gemini AI 筛选摘要 → 输出 HTML 邮件简报
- 给谁
- 希望自动聚合行业资讯、博客更新或竞品动态,并每日收到一封精选邮件的用户
- 你会得到
- 每日定时获取 RSS 内容,经 AI 按关键词筛选 Top 10-15 条,生成带图文的 HTML 邮件发送
- 你需要
- n8n
硬约束
需要:1)可访问的 n8n 实例(自托管或云版);2)Google Gemini API 凭证(googlePalmApi 类型);3)SMTP 发件凭证;4)替换示例中的 RSS 源为自己的订阅地址。
他们做了什么
作者 dixitram 在 n8n 上发布了一个模板工作流,利用 Schedule Trigger 每日定时触发,从两组 RSS 源(科技新闻与工具/产品)批量获取内容,经 Split Out 和 Loop Over Items 控制请求频率后合并为 CSV,通过 Google Gemini AI 按预设关键词筛选 Top 10-15 条并生成带样式的 HTML 邮件,最终由 SMTP 发送。模板内包含完整的节点连线、JavaScript 清理代码与 HTML 邮件模板。
效果如何
模板描述称 AI 可从每类列表中筛选 10-15 条相关内容,生成摘要并排版为 HTML 邮件发送(author_report)。未提供具体送达率或长期稳定性数据。
值得知道
1. 模型版本:workflow.json 中记录为 gemini-2.5-flash-preview-05-20,后续可能需随 n8n 节点更新调整。2. 双源设计:模板默认使用两个独立 RSS 列表(News 与 Tools),若只需单一类别需自行合并节点并改写提示词结构。3. 邮件样式:HTML 模板内嵌于 Analyze document 提示词中,修改时需同时调整 AI 输出格式与 Code 节点的清理逻辑。4. 费用:Gemini API 与 SMTP 均可能产生调用/发送费用,具体取决于用量与服务商定价。5. 本站未对该模板进行实际运行验证(reproduction=not_tested),搭建后请务必先手动测试再设为自动触发。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- Upload a file 节点:绑定Google Gemini/PaLM API 凭证。
- Analyze document 节点:绑定Google Gemini/PaLM API 凭证。
- Send email 节点:绑定smtp 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #10196(约 23 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-24
步骤
配置 API 与邮件凭证
在 n8n 中打开该模板后,先完成两类凭证: 1. Google Gemini API:进入 Credentials → 新建 googlePalmApi 类型凭证,填入 API Key;在两个 Gemini 节点(Upload a file、Analyze document)中分别选中该凭证。 2. SMTP:在 Send email 节点中新建 smtp 类型凭证,填入服务器地址、端口、用户名与密码;同时将该节点的 toEmail 和 fromEmail 改为实际收发地址。 应看到:两个 Gemini 节点不再显示红色凭证警告;Send email 节点显示已关联 SMTP 凭证。
替换 RSS 源与 AI 筛选关键词
修改两个 Set 节点中的 RSS 地址: - Tech News Sites 节点:替换 url 数组中的示例 feed(如 TechCrunch、The Verge 等)为你关注的新闻源。 - Tools Subredit and Sites 节点:替换 Url 数组中的示例 feed(如 Reddit、Product Hunt 等)为你关注的工具/产品源。 然后打开 Analyze document 节点,在 text 字段中找到关键词列表: - Tools & Products Keywords 与 News Keywords 两处 JSON 数组,按需增删关键词以匹配你的阅读兴趣。若不需要区分两类源,也可改为单一列表并调整后续提示词结构。 应看到:Set 节点输出预览显示你填入的 RSS URL;Analyze document 中的提示词已更新为你的关键词。
运行提示词 · 来源原文。Analyze document 节点的 text 输入字段;替换关键词数组后运行
# Tech Content Writer Prompt You are a tech content writer. I have two lists of items: 1️⃣ New Tools & Products {products_list} 2️⃣ Global & India Tech News {news_list} ## Task: - Select the **top 10-15 items** from each list based on these interests and keywords: - **Tools & Products Keywords:** ["AI", "automation", "developer", "open source", "productivity", "creative", "innovation", "API", "web app", "tools"] - **News Keywords:** ["technology innovation", "AI breakthrough", "framework", "developer update", "research", "automation trend", "product launch"] - Keep **two separate sections**: 1. Tools & Products (10-15 items) 2. Global & India Tech Innovations (10-15 items) - Summarize each item in **2-3 lines**. - **If an image URL is provided**, display it beautifully under the title with rounded edges - Tone: "Curious, energetic, and concise – focused on discovery, usefulness, and creativity." - Format using the HTML template below, replacing placeholder items with actual content from the lists. ## HTML Template: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Daily Tech Digest</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; background: #f5f5f5; margin: 0; padding: 16px; line-height: 1.5; font-size: 15px; color: #333; } .container { max-width: 600px; margin: 0 auto; background: #ffffff; border-radius: 8px; } .header { background: #000; color: #fff; padding: 20px 16px; border-radius: 8px 8px 0 0; } .header h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px 0; } .header p { font-size: 13px; margin: 0; opacity: 0.8; } .content { padding: 20px 16px; } .section { margin-bottom: 32px; } .section:last-child { margin-bottom: 0; } .section-title { font-size: 16px; font-weight: 600; color: #000; margin: 0 0 16px 0; padding-bottom: 8px; border-bottom: 2px solid #000; } .item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #e5e5e5; } .item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .item-title { font-size: 15px; font-weight: 600; color: #000; margin: 0 0 12px 0; } .item-image { width: 100%; height: auto; border-radius: 12px; margin-bottom: 12px; display: block; object-fit: cover; } .item-summary { font-size: 14px; color: #555; margin: 0 0 8px 0; } .item-link { color: #0066cc; text-decoration: none; font-size: 14px; font-weight: 500; } .footer { background: #f9f9f9; padding: 16px; text-align: center; font-size: 12px; color: #666; border-radius: 0 0 8px 8px; } </style> </head> <body> <div class="container"> <div class="header"> <h1>⚡ Daily Tech Digest</h1> <p>{current_date}</p> </div> <div class="content"> <!-- Tools & Products Section --> <div class="section"> <h2 class="section-title">🧠 New Tools & Products</h2> <!-- Example with Image --> <div class="item"> <div class="item-title">{Product Title 1}</div> <!-- Include image if URL is available --> <img src="{image_url}" alt="{Product Title}" class="item-image" onerror="this.style.display='none'"> <div class="item-summary"> {2-3 line summary of the product} </div> <a href="{product_link}" class="item-link">Learn more →</a> </div> <!-- Example without Image --> <div class="item"> <div class="item-title">{Product Title 2}</div> <div class="item-summary"> {2-3 line summary of the product} </div> <a href="{product_link}" class="item-link">Learn more →</a> </div> <!-- Add more items as needed --> </div> <!-- Global & India Tech News Section --> <div class="section"> <h2 class="section-title">🌍 Global & India Tech Innovations</h2> <!-- Example with Image --> <div class="item"> <div class="item-title">{News Title 1}</div> <!-- Include image if URL is available --> <img src="{image_url}" alt="{News Title}" class="item-image" onerror="this.style.display='none'"> <div class="item-summary"> {2-3 line summary of the news} </div> <a href="{news_link}" class="item-link">Read more →</a> </div> <!-- Example without Image --> <div class="item"> <div class="item-title">{News Title 2}</div> <div class="item-summary"> {2-3 line summary of the news} </div> <a href="{news_link}" class="item-link">Read more →</a> </div> <!-- Add more items as needed --> </div> </div> <div class="footer"> Stay curious. Keep building. </div> </div> </body> </html> ```理解工作流执行逻辑
保存并激活工作流后,执行顺序如下(无需手动干预): 1. Schedule Trigger 每日 9:00(或你设定的时间)触发。 2. 两个 Set 节点分别输出 Tech News 与 Tools 的 RSS URL 数组。 3. Split Out 将数组拆分为单条 URL;Loop Over Items 分批读取 RSS(batchSize 分别为 5 和 4,用于控制请求频率)。 4. RSS Feed Read 节点获取各源内容;Merge Both List 合并两路结果;Convert to File 转为 CSV。 5. Upload a file 节点将 CSV 上传给 Gemini;Analyze document 节点运行上述提示词,生成完整 HTML。 6. Code in JavaScript 节点清理输出中的换行符与代码块标记;Send email 节点发送 HTML 邮件。 注意:RSS Read OF Tech News 节点设置了 onError=continueRegularOutput,单源失败不会中断整体流程。
调整发送时间与激活
在 Schedule Trigger1 节点中修改 triggerAtHour 为你希望的运行小时(24 小时制)。确认所有节点无红色错误提示后,点击右上角的 Active 开关启用工作流。 首次验证:可临时将触发时间设为下一分钟,手动点击 Execute Workflow 观察运行日志,确认邮件成功收到后再改回日常时间。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你正在搭建一个 n8n 自动化简报工作流。请按以下顺序确认前置条件: 1. 已拥有 n8n 实例访问权限(自托管或云版)。 2. 已获取 Google Gemini API Key(用于 googlePalmApi 凭证)。 3. 已拥有 SMTP 发件账号(用于 smtp 凭证)。 4. 已准备至少 1-2 个可访问的 RSS 源地址。 确认后,导入模板 https://n8n.io/workflows/10196/,依次完成凭证配置、RSS 源替换、关键词调整、定时设置,最后激活并测试。
若需改为单一 RSS 类别而非 News+Tools 双源,请合并两个 Set 节点并删除 Merge 节点,同时修改 Analyze document 提示词中的列表结构。
来源
Create a personalized daily newsletter with Google Gemini AI and RSS feeds · dixitram · n8n.io · 2025-10-26
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。