SKILL.md
readonly只读
name
slack-workflows
description
Slack自动化和工作流构建器 - 通知、站会机器人、审批流程和跨平台集成
version
1.0.0
Slack工作流
通过智能工作流自动化Slack,实现通知、站会收集、审批流程和跨平台集成。基于n8n自动化模式。
概述
本技能涵盖:
- 自动通知和提醒
- 每日站会收集
- 审批工作流
- 跨平台集成
- 频道管理自动化
核心工作流
1. 每日站会机器人
workflow: "异步站会"
schedule: "工作日 9:00 AM"
steps:
1. send_prompt:
channel: 每位团队成员(私信)
message: |
👋 早上好!站会时间到了。
请分享:
1️⃣ 昨天完成了什么?
2️⃣ 今天在做什么?
3️⃣ 有什么阻碍?
请在此线程中回复 👇
2. collect_responses:
timeout: 2小时
reminder: 1小时后
3. compile_summary:
time: "11:00 AM"
channel: "#team-standup"
format: |
📋 *每日站会 - {date}*
{for_each_member}
*{name}*
✅ 昨天:{yesterday}
📌 今天:{today}
🚧 阻碍:{blockers}
---
{end_for}
*总结:*
• {total} 名团队成员已回复
• {blockers_count} 个阻碍已标记
4. flag_blockers:
if: blockers_count > 0
notify: 经理
action: 创建讨论线程
2. 审批工作流
workflow: "费用审批"
trigger: 表单提交 或 斜杠命令
steps:
1. receive_request:
data:
- 申请人
- 金额
- 类别
- 描述
- 收据链接
2. route_approval:
rules:
- if: 金额 < 100
approver: 直属经理
- if: 金额 >= 100 AND 金额 < 1000
approver: 部门主管
- if: 金额 >= 1000
approver: [部门主管, 财务]
type: 顺序审批
3. send_approval_request:
channel: 审批人私信
message: |
📝 *费用审批请求*
*申请人:* {requester}
*金额:* ${amount}
*类别:* {category}
*描述:* {description}
[查看收据]({receipt_url})
actions:
- button: "✅ 批准"
action: approve
- button: "❌ 拒绝"
action: reject
- button: "💬 提问"
action: request_info
4. handle_response:
approved:
- notify_requester: "您的费用已批准!🎉"
- create_task: 在会计系统中
- log: 在费用跟踪器中
rejected:
- notify_requester: "费用未批准。原因:{reason}"
- log: 附带拒绝原因
5. escalate_if_no_response:
timeout: 24小时
action: 提醒审批人
final_escalation: 48小时
3. 新员工入职
workflow: "员工入职"
trigger: 新员工添加到HRIS系统
timeline:
day_minus_7:
- create_channels:
- "#welcome-{name}"
- add_to: ["#general", "#team-{department}"]
- notify_it: "为{name}设置笔记本电脑"
- notify_manager: "入职流程将在7天后开始"
day_1:
- morning:
- post_welcome: "#general"
message: |
🎉 让我们欢迎 *{name}* 加入团队!
职位:{title}
团队:{department}
地点:{office}
趣事:{fun_fact}
打个招呼,让他们感受到欢迎!👋
- dm_new_hire:
message: |
欢迎加入{Company}!🚀
以下是您的第一步:
1. [完成HR文件]({hr_link})
2. [设置您的账户]({it_link})
3. [认识团队]({org_chart})
您的伙伴是@{buddy_name} - 随时联系!
- afternoon:
- schedule_intros: 与关键利益相关者
day_3:
- check_in:
dm: "第一周感觉如何?有什么问题吗?"
day_7:
- survey:
question: "您的入职体验如何?"
scale: 1-5
day_30:
- feedback_request:
dm: "您已经入职一个月了!我们有哪些可以改进的地方?"
4. 事件响应
workflow: "事件告警"
trigger: 监控告警 或 手动触发
severity_levels:
critical:
- create_channel: "#incident-{timestamp}"
- notify: "@channel in #engineering"
- page: 值班工程师
- create_war_room: 视频链接
- start_timer: 用于解决跟踪
high:
- notify: "#engineering-alerts"
- assign: 值班工程师
- create_ticket: 在Jira中
medium:
- notify: "#engineering-alerts"
- create_ticket: 在Jira中
low:
- create_ticket: 在Jira中
- notify: 下一个工作日
incident_channel_template: |
🚨 *事件:{title}*
*严重级别:* {severity}
*状态:* 调查中
*开始时间:* {timestamp}
*指挥官:* @{commander}
---
*受影响系统:*
{systems}
*客户影响:*
{impact}
---
📋 *操作:*
• [ ] 识别根本原因
• [ ] 实施修复
• [ ] 验证解决
• [ ] 通知利益相关者
🔗 *链接:*
• [操作手册]({runbook_url})
• [仪表盘]({dashboard_url})
• [视频会议室]({video_url})
resolution_flow:
1. commander_declares: "已解决"
2. notify_stakeholders: 解决消息
3. archive_channel: 24小时后
4. create_postmortem: 在Notion中
5. schedule_review: 在日历中
5. 跨平台同步
workflow: "CRM到Slack通知"
triggers:
hubspot_deal_won:
channel: "#wins"
message: |
🎉 *交易关闭!*
*公司:* {company}
*金额:* ${amount}
*销售代表:* @{sales_rep}
*产品:* {product}
恭喜!🚀
hubspot_deal_lost:
channel: "#sales-team"
message: |
📊 *交易丢失*
*公司:* {company}
*金额:* ${amount}
*原因:* {loss_reason}
*竞争对手:* {competitor}
请在下方线程中讨论经验教训 👇
github_pr_merged:
channel: "#engineering"
message: |
✅ PR已合并:*{pr_title}*
作者:@{author}
{pr_description_summary}
stripe_payment_failed:
channel: "#revenue-alerts"
message: |
⚠️ *支付失败*
*客户:* {customer_email}
*金额:* ${amount}
*原因:* {failure_reason}
[在Stripe中查看]({stripe_link})
斜杠命令
自定义命令
slash_commands:
/kudos:
description: "表扬团队成员"
usage: "/kudos @person for [reason]"
action:
- post_to: "#kudos"
- format: |
🌟 *表扬!*
@{sender} 表扬了 @{recipient}
> {reason}
- track: 在表扬记录表中
/pto:
description: "请假申请"
usage: "/pto [start_date] to [end_date] for [reason]"
action:
- create_approval: 请假审批流程
- update_calendar: 锁定日期
- notify_team: 如果批准
/standup:
description: "提交异步站会"
usage: "/standup"
action:
- open_modal: 站会表单
- collect_responses: 昨天, 今天, 阻碍
- post_to: "#team-standup"
/poll:
description: "创建快速投票"
usage: "/poll '问题' '选项1' '选项2' ..."
action:
- create_message: 带表情反应
- track_votes: 按表情计数
- close_poll: 24小时后或手动关闭
频道管理
channel_automation:
project_channels:
trigger: jira项目创建
action:
- create_channel: "#proj-{project_key}"
- add_members: 项目团队
- set_topic: "{project_name} - {project_description}"
- pin_message: 项目资源
- archive: 项目完成时
customer_channels:
trigger: 交易关闭成功
action:
- create_channel: "#customer-{company}"
- add_members: [客户成功经理, 销售代表, 支持人员]
- set_purpose: "{company}的支持频道"
- integrate: zendesk告警
cleanup:
schedule: 每月
rules:
- archive_if:
no_messages: 90天
AND:
not_pinned: true
not_customer_channel: true
- notify_before_archive: 7天
输出示例
请求:"在Slack中设置交易成功通知"
输出:
# 交易成功通知设置
## 工作流配置
```yaml
trigger: hubspot_deal_stage_changed
condition: new_stage == "Closed Won"
action:
channel: "#wins"
message: see_below
消息模板
🎉 *交易成功!*
━━━━━━━━━━━━━━━━━━━━━━
🏢 *公司:* {company_name}
💰 *金额:* ${deal_amount}
👤 *销售代表:* @{owner_slack_id}
📦 *产品:* {product_line}
━━━━━━━━━━━━━━━━━━━━━━
*交易摘要:*
• 销售周期:{days_in_pipeline} 天
• 线索来源:{lead_source}
• 行业:{industry}
🎊 恭喜团队!
n8n实现
// HubSpot触发器 → Slack节点
{
"nodes": [
{
"name": "HubSpot Trigger",
"type": "n8n-nodes-base.hubspotTrigger",
"parameters": {
"eventsUi": {
"eventValues": ["deal.propertyChange"]
},
"property": "dealstage",
"value": "closedwon"
}
},
{
"name": "Format Message",
"type": "n8n-nodes-base.set",
"parameters": {
"values": {
"message": "🎉 *DEAL CLOSED!*\n\n🏢 {{$json.company}}\n💰 ${{$json.amount}}"
}
}
},
{
"name": "Slack",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#wins",
"text": "={{$json.message}}"
}
}
]
}
示例输出
🎉 *交易成功!*
━━━━━━━━━━━━━━━━━━━━━━
🏢 *公司:* Acme Corporation
💰 *金额:* $45,000
👤 *销售代表:* @alice.chen
📦 *产品:* Enterprise Plan
━━━━━━━━━━━━━━━━━━━━━━
*交易摘要:*
• 销售周期:45 天
• 线索来源:入站 - 网站
• 行业:科技
🎊 恭喜团队!
---
*Slack工作流技能 - Claude办公技能套件的一部分*






