SKILL.md
readonlyread-only
name
slack-workflows
description
Slack automation and workflow builder - notifications, standup bots, approval flows, and cross-platform integrations
version
1.0.0
Slack Workflows
使用智慧型工作流程自動化 Slack,涵蓋通知、站會收集、審核流程與跨平台整合。基於 n8n 自動化模式。
概述
此技能涵蓋:
- 自動化通知與警示
- 每日站會收集
- 審核流程
- 跨平台整合
- 頻道管理自動化
核心工作流程
1. 每日站會機器人
workflow: "非同步站會"
schedule: "週一至週五 上午 9:00"
steps:
1. send_prompt:
channel: 每位團隊成員(私訊)
message: |
👋 早安!站會時間到了。
請分享:
1️⃣ 昨天完成了什麼?
2️⃣ 今天要做什麼?
3️⃣ 有沒有遇到阻礙?
請在此討論串回覆 👇
2. collect_responses:
timeout: 2 小時
reminder: 1 小時後提醒
3. compile_summary:
time: "上午 11:00"
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]({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 [原因]"
action:
- post_to: "#kudos"
- format: |
🌟 *Kudos!*
@{sender} 表揚了 @{recipient}
> {reason}
- track: 在表揚試算表中
/pto:
description: "請假"
usage: "/pto [開始日期] to [結束日期] for [原因]"
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: 見下方
訊息範本
🎉 *成交!*
━━━━━━━━━━━━━━━━━━━━━━
🏢 *公司:* {company_name}
💰 *金額:* ${deal_amount}
👤 *業務:* @{owner_slack_id}
📦 *產品:* {product_line}
━━━━━━━━━━━━━━━━━━━━━━
*交易摘要:*
• 銷售週期:{days_in_pipeline} 天
• 潛在客戶來源:{lead_source}
• 產業:{industry}
🎊 恭喜團隊!
n8n 實作
// HubSpot Trigger → Slack Node
{
"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 天
• 潛在客戶來源:Inbound - Website
• 產業:Technology
🎊 恭喜團隊!
---
*Slack Workflows Skill - Part of Claude Office Skills*






