返回顶部
n

notification-system通知系统管理

Manage outbound notifications across WhatsApp, Telegram, email. Handle templates, scheduling, delivery tracking, rate limiting.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
158
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

notification-system

通知系统代理

用于所有渠道(WhatsApp、Telegram、电子邮件)的集中式外发通知管理。

架构

notification-system/
├── SKILL.md # 本文件
├── templates/ # 按渠道和类型分类的消息模板
│ ├── whatsapp/ # WhatsApp 模板
│ ├── telegram/ # Telegram 模板
│ └── email/ # 电子邮件模板
├── queue/ # 待处理通知队列
├── logs/ # 投递日志
├── rate-limiters.json # 速率限制配置
└── config/ # 渠道配置

支持的渠道

渠道配置速率限制
WhatsAppchannels.whatsapp60 条/分钟,1000 条/天
Telegram
channels.telegram | 30 条/秒,20 条/分钟 | | 电子邮件(Outlook) | office365-connector | 30 封/小时,300 封/天 |

速率限制

每个渠道的默认限制:

  • - WhatsApp:1 条消息/秒(安全值),突发 5 条
  • Telegram:API 硬限制 30 条消息/秒
  • 电子邮件:60 封/小时,防止被标记为垃圾邮件

速率限制配置:notification-system/rate-limiters.json

模板变量

所有模板支持:

{{recipient}} - 目标名称/ID
{{date}} - 当前日期
{{time}} - 当前时间
{{subject}} - 消息主题
{{body}} - 消息正文
{{cta_url}} - 行动号召链接
{{sender_name}} - 商家/发送者名称
{{company}} - 公司名称

发送通知

WhatsApp

bash

通过消息工具

message send --channel whatsapp --target +18184389562 --message 您的预约已确认,日期为 {{date}}

Telegram

bash

通过消息工具

message send --channel telegram --target 655641853 --message 系统警报:{{subject}}

电子邮件

bash

通过 Outlook 技能

outlook send --to recipient@email.com --subject {{subject}} --body {{body}}

队列系统

通知存储在 notification-system/queue/pending.json 队列中:

json
{
id: uuid,
channel: whatsapp|telegram|email,
target: recipient-id,
template: template-name,
variables: {},
scheduled_at: ISO8601 或 null,
created_at: ISO8601,
priority: high|normal|low,
status: pending|sent|failed|delivered,
attempts: 0,
last_error: null
}

定时发送

定时通知存储在 notification-system/queue/scheduled.json 中,采用类似 cron 的调度方式。

使用 cron 作业配合 notification-system/process-queue.js 处理定时项目。

投递跟踪

日志存储在 notification-system/logs/delivery-YYYY-MM-DD.json 中:

json
{
id: notification-uuid,
timestamp: ISO8601,
channel: whatsapp,
target: +1...,
template: appointment-confirm,
status: delivered|sent|failed,
latency_ms: 450,
error: null
}

模板管理

模板存储在 notification-system/templates/{channel}/{type}.md 中:

templates/
├── whatsapp/
│ ├── appointment-confirm.md
│ ├── appointment-reminder.md
│ ├── payment-received.md
│ ├── status-update.md
│ ├── broadcast-promotion.md
│ └── support-acknowledged.md
├── telegram/
│ ├── system-alert.md
│ ├── status-report.md
│ ├── daily-brief.md
│ └── broadcast.md
└── email/
├── invoice.md
├── welcome.md
└── notification.md

处理队列

处理待处理通知:

bash
node notification-system/process-queue.js

状态命令

  • - 列出待处理项:Get-Content queue/pending.json | ConvertFrom-Json
  • 检查速率限制:Get-Content rate-limiters.json
  • 查看最近日志:Get-Content logs/delivery-$(Get-Date -Format yyyy-MM-dd).json

最佳实践

  1. 1. 合理批量处理:对相似通知进行分组,尊重免打扰时段
  2. 备用渠道:如果 WhatsApp 失败,尝试 Telegram,然后是电子邮件
  3. 去重处理:24 小时内不发送相同通知两次
  4. 退订处理:立即响应 STOP/退订请求
  5. 个性化设置:使用收件人姓名和相关变量
  6. 监控投递:检查日志中的失败情况并重试

优先级处理

  • - high:系统警报、紧急事项 → 跳过速率限制队列
  • normal:标准通知 → 正常速率限制
  • low:营销、非紧急事项 → 最严格的速率限制

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 notification-system-1776014349 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 notification-system-1776014349 技能

通过命令行安装

skillhub install notification-system-1776014349

下载

⬇ 下载 notification-system v1.0.1(免费)

文件大小: 11.76 KB | 发布时间: 2026-4-13 11:13

v1.0.1 最新 2026-4-13 11:13
- Updated the pending notifications queue (queue/pending.json)
- No changes to documentation or logic; underlying notification system and usage remain the same

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部