用 GPT-4.1-mini 自动分类 GitHub Issue 并同步到 Slack、Gmail、ClickUp 和 Sheets
GitHub 新 Issue → AI 分析 → 并行输出到表格、任务、通知和标签
- 给谁
- 需要自动处理 GitHub Issue 并同步多平台通知的开发团队或运维人员
- 你会得到
- 新 Issue 触发后,AI 自动提取分类、严重度、优先级等信息,同时写入 Google Sheets、创建 ClickUp 任务、发送 Slack 和 Gmail 通知、回复 GitHub 评论并打标签
- 你需要
- n8n · github · google-sheets · clickup · slack · gmail
硬约束
在 n8n 中导入模板工作流,配置 GitHub、OpenAI、Slack、Gmail、ClickUp、Google Sheets 的凭证,指定仓库和通知渠道,激活后即可自动运行。需要 n8n 实例及上述服务的 API 或 OAuth 凭证。
他们做了什么
模板作者 itechnotion 在 n8n 上发布了一个工作流模板。该模板监听 GitHub 仓库的 issue 事件,当有新 Issue 创建时,先通过 If 节点过滤出 opened 动作,然后将 Issue 标题、正文和元数据发送给 GPT-4.1-mini 进行结构化分析,提取分类、严重度、优先级、预估工时、指派团队、摘要和建议操作。接着用一个 Code 节点将 AI 的文本输出解析为 JSON 并追加日期。最后并行执行六个动作:将数据追加到 Google Sheets、在 ClickUp 创建任务、发送 Slack 消息到 #github-alerts、发送 HTML 格式 Gmail 邮件、在 GitHub Issue 下添加评论、以及通过 GitHub API 为 Issue 打上 category 和 severity 标签。
效果如何
来源未提供具体的运行次数、成功率或团队反馈数据。模板描述声称可以「无需人工干预」自动处理 Issue,并将信息同步到多个平台。
值得知道
作者自述效果(author_report):声称消除人工分类、保持团队信息同步、防止遗漏。已知限制:1) HTTP Request 节点使用硬编码 Bearer YOUR_TOKEN_HERE,建议替换为 n8n 凭证引用;2) 需要配置六种外部服务凭证才能运行;3) 邮件收件人写死为 [email protected],需替换为实际地址;4) Slack 频道固定为 #github-alerts;5) 本站未实测(reproduction=not_tested),不保证各平台 API 变更后的兼容性。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- Github Trigger 节点:绑定GitHub API 凭证。
- Send a message 节点:绑定Slack API 凭证。
- Message a model 节点:绑定OpenAI API 凭证。
- Send a message1 节点:绑定Gmail OAuth2 凭证。
- Create a task 节点:绑定clickUpApi 凭证。
- Create a comment on an issue 节点:绑定GitHub API 凭证。
- Append row in sheet 节点:绑定Google Sheets OAuth2 凭证。
- 将 __UKH_BEARER_8__ 替换为实际密钥/令牌(原路径 /nodes/8/parameters/headerParameters/parameters/1/value;literal auth header)。
需要替换的配置
- 源模板来自 n8n 公开库 #15169(约 18 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。 另将 1 处字面量密钥替换为 __UKH_…__ 占位符。
模板获取日期: 2026-10-24
步骤
触发与过滤
使用 GitHub Trigger 节点监听指定仓库的 issue 事件。添加 If 节点,条件为 $json.body.action 等于 opened,确保只处理新创建的 Issue。
AI 分析与结构化
Message a model 节点调用 GPT-4.1-mini,传入 Issue 标题、正文和元数据,使用结构化系统提示词提取 category、subcategory、severity、priority、estimated_effort、assigned_team、summary、suggested_action、label、affected_area。Parse AI Response 节点用 JavaScript 将 AI 返回的文本解析为 JSON,并追加当前日期(DD-MM-YYYY)。
运行提示词 · 来源原文。n8n 'Message a model' 节点的 System/User 提示词字段(responses.values[0].content)
You are a senior GitHub Issue Analyst with 10+ years of software development experience. Analyze the following GitHub issue carefully and return a precise structured report. --- ISSUE DETAILS --- Title: {{ $json.body.issue.title }} Description: {{ $json.body.issue.body }} Repository: {{ $json.body.repository.name }} Opened By: {{ $json.body.issue.user.login }} Existing Labels: {{ $json.body.issue.labels.length > 0 ? $json.body.issue.labels[0].name : 'None' }} --- ANALYSIS RULES --- - Read the title AND description carefully before deciding - If description is vague or missing, base analysis on title only - Severity should reflect real-world impact on users - Priority should reflect how soon a developer should act - Label must exactly match one of the allowed values below --- YOUR TASK --- Respond ONLY in this exact format. No extra text, no markdown, no explanation: CATEGORY: [Pick one: Bug Report | Feature Request | Documentation | Performance | Security | Question | UI/UX | Testing | Dependency | Other] SUBCATEGORY: [A specific 3-5 word description e.g. "File Upload Crash", "API Rate Limit", "Dark Mode Toggle"] SEVERITY: [Pick one: Critical | High | Medium | Low] PRIORITY: [Pick one: Urgent | High | Normal | Low] ESTIMATED EFFORT: [Pick one: Small (1-2 hrs) | Medium (half day) | Large (1-2 days) | Extra Large (3+ days)] LABEL: [Pick one that matches CATEGORY exactly: Bug Report | Feature Request | Documentation | Performance | Security | Question | UI/UX | Testing | Dependency | Other] SUMMARY: [2-3 clear sentences: what the issue is, what is broken or needed, and what the impact is on users] SUGGESTED ACTION: [One specific, actionable first step for the developer. Be technical and precise.] ASSIGNED TEAM: [Pick one: Frontend | Backend | DevOps | QA | Design | Full Stack | Documentation Team] AFFECTED AREA: [Which part of the app is affected e.g. "File Upload Module", "Authentication System", "Database Layer", "UI Components"] --- SEVERITY GUIDE (use this to decide) --- Critical = App is completely broken, data loss, security breach, affects ALL users High = Major feature broken, affects MANY users, no workaround exists Medium = Feature partially broken, some users affected, workaround exists Low = Minor issue, cosmetic, docs, affects very few users --- PRIORITY GUIDE (use this to decide) --- Urgent = Must fix today, blocking users or security risk High = Fix this week, significantly impacts user experience Normal = Fix this sprint, standard issue Low = Fix when time allows, nice to have运行提示词 · 来源原文。n8n 'Parse AI Response' 节点的 JS Code 字段
const items = $input.all(); return items.map(item => { const text = item.json.output[0].content[0].text; const result = {}; text.split("\n\n").forEach(line => { const [key, ...rest] = line.split(":"); if (key && rest.length) { const formattedKey = key.trim().toLowerCase().replace(/ /g, "_"); result[formattedKey] = rest.join(":").trim(); } }); // ✅ Added date (DD-MM-YYYY) const now = new Date(); const day = String(now.getDate()).padStart(2, '0'); const month = String(now.getMonth() + 1).padStart(2, '0'); const year = now.getFullYear(); result.date = `${day}-${month}-${year}`; return { json: result }; });并行输出与同步
Parse AI Response 之后,工作流并行执行六个动作:1) Append row in sheet 将日期、标题、分类、优先级、严重度、GitHub 链接等写入 Google Sheets;2) Create a task 在 ClickUp 创建带优先级的任务,任务描述包含完整 Issue 和 AI 分析;3) Send a message 发送格式化 Slack 消息到 #github-alerts;4) Send a message1 发送 HTML 格式 Gmail 邮件;5) Create a comment on an issue 在 GitHub Issue 下回复 AI 分析摘要;6) HTTP Request 调用 GitHub API 为 Issue 添加 category 和 severity 标签。
运行提示词 · 来源原文。n8n 'Send a message' (Slack) 节点的 text 字段
=🚨 *New GitHub Issue Opened!* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ *📌 Title:* {{ $('If').item.json.body.issue.title }} *🔢 Issue No:* #{{ $('If').item.json.body.issue.number }} *📁 Repository:* {{ $('If').item.json.body.repository.name }} *👤 Opened by:* {{ $('If').item.json.body.issue.user.login }} *🕒 Created at:* {{ $('If').item.json.body.issue.created_at }} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🤖 *AI ISSUE ANALYSIS* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📂 *Category:* {{ $('Parse AI Response').item.json.category }} 🔍 *Subcategory:* {{ $('Parse AI Response').item.json.subcategory }} 🔴 *Severity:* {{ $('Parse AI Response').item.json.severity }} ⚡ *Priority:* {{ $('Parse AI Response').item.json.priority }} ⏱️ *Est. Effort:* {{ $('Parse AI Response').item.json.estimated_effort }} 👥 *Assigned Team:* {{ $('Parse AI Response').item.json.assigned_team }} 📝 *Summary:* {{ $('Parse AI Response').item.json.summary }} ✅ *Suggested Action:* {{ $('Parse AI Response').item.json.suggested_action }} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔗 *GitHub Link:* {{ $('If').item.json.body.issue.html_url }} 📋 *ClickUp Task Created* ✅ 📧 *Email Notification Sent* ✅运行提示词 · 来源原文。n8n 'Send a message1' (Gmail) 节点的 message 字段
==<div style="font-family: Arial, sans-serif; max-width: 680px; margin: auto; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;"> <!-- HEADER --> <div style="background: #1a1a2e; padding: 24px; text-align: center;"> <h1 style="color: #ffffff; margin: 0; font-size: 22px;">🚨 New GitHub Issue Opened</h1> <p style="color: #aaaaaa; margin: 6px 0 0;">Automated Issue Tracker — Instant Notification</p> </div> <!-- ISSUE DETAILS --> <div style="padding: 24px; background: #ffffff;"> <h2 style="color: #1a1a2e; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px;">📌 Issue Details</h2> <table style="width:100%; border-collapse: collapse;"> <tr style="background:#f9f9f9;"> <td style="padding:10px; font-weight:bold; width:35%; color:#555;">Title</td> <td style="padding:10px;">{{ $('If').item.json.body.issue.title }}</td> </tr> <tr> <td style="padding:10px; font-weight:bold; color:#555;">Issue Number</td> <td style="padding:10px;">#{{ $('If').item.json.body.issue.number }}</td> </tr> <tr style="background:#f9f9f9;"> <td style="padding:10px; font-weight:bold; color:#555;">Repository</td> <td style="padding:10px;">{{ $('If').item.json.body.repository.name }}</td> </tr> <tr> <td style="padding:10px; font-weight:bold; color:#555;">Opened By</td> <td style="padding:10px;">{{ $('If').item.json.body.issue.user.login }}</td> </tr> <tr style="background:#f9f9f9;"> <td style="padding:10px; font-weight:bold; color:#555;">Created At</td> <td style="padding:10px;">{{ $('If').item.json.body.issue.created_at }}</td> </tr> </table> <!-- ISSUE DESCRIPTION --> <h2 style="color:#1a1a2e; border-bottom:2px solid #f0f0f0; padding-bottom:8px; margin-top:28px;">📝 Issue Description</h2> <div style="background:#f9f9f9; padding:14px; border-left:4px solid #1a1a2e; border-radius:4px; white-space:pre-line; color:#333;"> {{ $('If').item.json.body.issue.body }} </div> <!-- AI ANALYSIS --> <h2 style="color:#1a1a2e; border-bottom:2px solid #f0f0f0; padding-bottom:8px; margin-top:28px;">🤖 AI Issue Analysis</h2> <table style="width:100%; border-collapse:collapse;"> <tr style="background:#fff3cd;"> <td style="padding:10px; font-weight:bold; width:35%; color:#555;">📂 Category</td> <td style="padding:10px;">{{ $('Parse AI Response').item.json.category }}</td> </tr> <tr> <td style="padding:10px; font-weight:bold; color:#555;">🔍 Subcategory</td> <td style="padding:10px;">{{ $('Parse AI Response').item.json.subcategory }}</td> </tr> <tr style="background:#f8d7da;"> <td style="padding:10px; font-weight:bold; color:#555;">🔴 Severity</td> <td style="padding:10px; font-weight:bold; color:#c0392b;">{{ $('Parse AI Response').item.json.severity }}</td> </tr> <tr> <td style="padding:10px; font-weight:bold; color:#555;">⚡ Priority</td> <td style="padding:10px; font-weight:bold; color:#e67e22;">{{ $('Parse AI Response').item.json.priority }}</td> </tr> <tr style="background:#f9f9f9;"> <td style="padding:10px; font-weight:bold; color:#555;">⏱️ Est. Effort</td> <td style="padding:10px;">{{ $('Parse AI Response').item.json.estimated_effort }}</td> </tr> <tr> <td style="padding:10px; font-weight:bold; color:#555;">👥 Assigned Team</td> <td style="padding:10px;">{{ $('Parse AI Response').item.json.assigned_team }}</td> </tr> </table> <!-- SUMMARY --> <h2 style="color:#1a1a2e; border-bottom:2px solid #f0f0f0; padding-bottom:8px; margin-top:28px;">📋 Summary</h2> <p style="background:#eaf4fb; padding:14px; border-left:4px solid #3498db; border-radius:4px; color:#333;"> {{ $('Parse AI Response').item.json.summary }} </p> <!-- SUGGESTED ACTION --> <h2 style="color:#1a1a2e; border-bottom:2px solid #f0f0f0; padding-bottom:8px; margin-top:28px;">✅ Suggested Action</h2> <p style="background:#eafaf1; padding:14px; border-left:4px solid #27ae60; border-radius:4px; color:#333;"> {{ $('Parse AI Response').item.json.suggested_action }} </p> <!-- BUTTON --> <div style="text-align:center; margin-top:32px;"> <a href="{{ $('If').item.json.body.issue.html_url }}" style="background:#1a1a2e; color:#ffffff; padding:14px 32px; text-decoration:none; border-radius:6px; font-size:16px; display:inline-block;"> 🔗 View Issue on GitHub </a> </div> </div> <!-- FOOTER --> <div style="background:#f4f4f4; padding:16px; text-align:center; color:#999; font-size:12px;"> This email was automatically generated by your n8n GitHub Issue Tracker 🚀<br/> Repository: {{ $('If').item.json.body.repository.full_name }} </div> </div>运行提示词 · 来源原文。n8n 'Create a task' (ClickUp) 节点的 additionalFields.content 字段
=GitHub Issue Details Title: {{ $('If').item.json.body.issue.title }} Issue: {{ $('If').item.json.body.issue.number }} Repository: {{ $('If').item.json.body.repository.name }} Opened By: {{ $('If').item.json.body.issue.user.login }} --- AI Analysis Category: {{ $('Parse AI Response').item.json.category }} Subcategory: {{ $('Parse AI Response').item.json.subcategory }} Severity: {{ $('Parse AI Response').item.json.severity }} Priority: {{ $('Parse AI Response').item.json.priority }} Summary: {{ $('Parse AI Response').item.json.summary }} Suggested Action: {{ $('Parse AI Response').item.json.suggested_action }} --- 🔗 {{ $('If').item.json.body.issue.html_url }}运行提示词 · 来源原文。n8n 'Create a comment on an issue' 节点的 body 字段
=👋 Hey @{{ $('If').item.json.body.issue.user.login }}, thanks for opening this issue! Our AI has reviewed it and here's what we found: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🤖 AI ANALYSIS RESULT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📂 Category: {{ $('Parse AI Response').item.json.category }} 🔍 Subcategory: {{ $('Parse AI Response').item.json.subcategory }} 🔴 Severity: {{ $('Parse AI Response').item.json.severity }} ⚡ Priority: {{ $('Parse AI Response').item.json.priority }} ⏱️ Estimated Effort: {{ $('Parse AI Response').item.json.estimated_effort }} 👥 Assigned Team: {{ $('Parse AI Response').item.json.assigned_team }} 📝 Summary: {{ $('Parse AI Response').item.json.summary }} ✅ Suggested Action: {{ $('Parse AI Response').item.json.suggested_action }} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📋 A ClickUp task has been created for this issue 📧 The team has been notified via email & Slack 🔗 We will review and respond as soon as possible 🤖 This comment was auto-generated by our Issue Tracker Bot
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,协助用户导入模板并替换占位符
这一段是提示词,页面不会在这里插入广告。
你是一个 n8n 工作流搭建助手。用户想要复现「用 GPT-4.1-mini 自动分类 GitHub Issue 并同步到多平台」的模板。请按以下顺序协助: 1. 确认用户已有 n8n 实例和所需服务的凭证(GitHub、OpenAI、Slack、Gmail、ClickUp、Google Sheets)。 2. 指导从 https://n8n.io/workflows/15169/ 导入模板或根据提供的 workflow.json 手动创建节点。 3. 提醒替换所有 YOUR_* 占位符(仓库名、用户名、Sheet ID、ClickUp List/Team/Space ID、收件人邮箱、Slack 频道)。 4. 说明 HTTP Request 节点中 YOUR_TOKEN_HERE 应替换为 GitHub Personal Access Token,并建议改用 n8n 凭证引用而非硬编码。 5. 建议先用测试 Issue 触发验证各节点输出,再激活工作流。
导入 n8n 模板后,先配置凭证,再批量替换 YOUR_* 占位符,最后测试触发。
来源
Triage GitHub issues with GPT-4.1-mini, Slack, Gmail, ClickUp and Sheets · itechnotion · n8n.io · 2026-04-20
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。