Install
openclaw skills install pushplus-notificationSend push notifications via pushplus HTTP API to WeChat, email, webhook, SMS and more. Use when the user asks to send notifications, push messages, WeChat messages, alerts, reminders, or mentions pushplus. No external dependencies required — only needs a PUSHPLUS_TOKEN and curl/Shell access.
openclaw skills install pushplus-notification通过 pushplus HTTP API 直接向微信、邮箱、webhook、短信等渠道推送消息。无需安装任何依赖,只需 Shell 工具 + curl 即可使用。
用户需要提供 PUSHPLUS_TOKEN(32 位字符串),在 pushplus.plus 注册后获取。
获取 token 的方式(按优先级):
PUSHPLUS_TOKEN.env 文件中仅提取 PUSHPLUS_TOKEN 的值(使用 grep ^PUSHPLUS_TOKEN= .env 或等效方式,禁止读取 .env 文件的其他内容,以避免泄露无关凭证)如果找不到 token,必须询问用户,不要猜测。
| 功能 | 方法 | URL |
|---|---|---|
| 单条发送 | POST | https://www.pushplus.plus/send |
| 多渠道批量发送 | POST | https://www.pushplus.plus/batchSend |
Content-Type: application/json
使用 Shell 工具执行 curl 命令:
curl -s -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"TOKEN","title":"标题","content":"内容","template":"html","channel":"wechat"}'
| 参数 | 必填 | 默认值 | 说明 |
|---|---|---|---|
token | 是 | — | 用户令牌,32 位字符串 |
title | 是 | — | 消息标题,最大 100 字符 |
content | 是 | — | 消息内容,根据 template 渲染 |
template | 否 | html | 模板类型 |
channel | 否 | wechat | 推送渠道 |
topic | 否 | — | 群组编码,不填仅发送给自己 |
to | 否 | — | 好友令牌,多人用逗号隔开 |
webhook | 否 | — | 第三方 webhook 地址(channel 为 webhook 时) |
callbackUrl | 否 | — | 消息回调地址 |
timestamp | 否 | — | 毫秒时间戳,用于防重复 |
| 参数 | 必填 | 默认值 | 说明 |
|---|---|---|---|
token | 是 | — | 用户令牌 |
content | 是 | — | 消息内容 |
channel | 否 | wechat | 多个渠道用逗号隔开,如 wechat,mail |
title | 否 | — | 消息标题 |
option | 否 | — | 渠道配置参数,多个用逗号隔开对应 channel |
topic | 否 | — | 群组编码 |
template | 否 | html | 模板类型 |
callbackUrl | 否 | — | 回调地址 |
timestamp | 否 | — | 毫秒时间戳 |
to | 否 | — | 好友令牌 |
| 值 | 说明 |
|---|---|
html | HTML 富文本(默认) |
txt | 纯文本 |
markdown | Markdown 格式 |
json | JSON 可视化展示 |
cloudMonitor | 阿里云监控 |
jenkins | Jenkins 构建通知 |
route | 路由模板 |
pay | 支付模板 |
| 值 | 说明 |
|---|---|
wechat | 微信公众号(默认) |
webhook | 第三方 webhook |
cp | 企业微信 |
mail | 邮箱 |
sms | 短信 |
voice | 语音 |
extension | 扩展渠道 |
app | APP 推送 |
{"code": 200, "msg": "请求成功", "data": "消息流水号"}
code 为 200 表示成功data 为消息流水号msg 排查(常见:token 无效、余额不足)PUSHPLUS_TOKENcode 是否为 200,向用户反馈结果| 场景 | 模板 | 说明 |
|---|---|---|
| 简单文本通知 | txt | 最简洁 |
| 带格式的报告/日志 | markdown | 支持标题、列表、代码块 |
| 富文本/邮件通知 | html | 支持样式和排版 |
| 结构化数据 | json | 自动渲染为可视化表格 |
curl -s -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"YOUR_TOKEN","title":"任务完成","content":"## 任务已完成\n\n- **任务**: 代码重构\n- **状态**: 成功\n- **耗时**: 5分钟","template":"markdown","channel":"wechat"}'
curl -s -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"YOUR_TOKEN","title":"构建失败","content":"<h2 style=\"color:red\">构建失败</h2><p>项目 my-app 构建失败,请检查日志。</p>","template":"html","channel":"wechat"}'
curl -s -X POST "https://www.pushplus.plus/batchSend" \
-H "Content-Type: application/json" \
-d '{"token":"YOUR_TOKEN","title":"紧急通知","content":"服务器 CPU 超过 90%","channel":"wechat,mail","template":"txt"}'
\"\n\" 转义a1b2****ef90)。.env 文件获取 token 时,仅提取 PUSHPLUS_TOKEN 行,禁止读取或输出文件中的其他变量。