Gotify Notification Skill
Send push notifications to your Gotify server when long-running tasks complete or important events occur.
Purpose
This skill enables Clawdbot to send push notifications via Gotify, useful for:
- - Alerting when long-running tasks complete
- Sending status updates for background operations
- Notifying of important events or errors
- Integration with task completion hooks
Setup
Create the credentials file: INLINECODE0
CODEBLOCK0
- -
url: Your Gotify server URL (no trailing slash) - INLINECODE2 : Application token from Gotify (Settings → Apps → Create Application)
Usage
Basic Notification
CODEBLOCK1
With Title
CODEBLOCK2
With Priority (0-10)
CODEBLOCK3
Markdown Support
CODEBLOCK4
Integration with Task Completion
Option 1: Direct Call After Task
CODEBLOCK5
Option 2: Hook Integration (Future)
When Clawdbot supports task completion hooks, this skill can be triggered automatically:
CODEBLOCK6
Parameters
- -
-m, --message <text>: Notification message (required) - INLINECODE4 : Notification title (optional)
- INLINECODE5 : Priority level (default: 5)
- 0-3: Low priority
- 4-7: Normal priority
- 8-10: High priority (may trigger sound/vibration)
- -
--markdown: Enable markdown formatting in message
Examples
Notify when subagent finishes
CODEBLOCK7
Notify on error with high priority
CODEBLOCK8
Rich markdown notification
CODEBLOCK9
Workflow
When the user says:
- - "Notify me when this finishes" → Add
&& bash scripts/send.sh "Task complete" to their command - "Send a Gotify alert" → Run
bash scripts/send.sh with their message - "Push notification for task completion" → Integrate into their workflow with appropriate title/priority
Always confirm the notification was sent successfully (check for JSON response with message ID).
Notes
- - Requires network access to your Gotify server
- App token must have "create message" permission
- Priority levels affect notification behavior on client devices
- Markdown support depends on Gotify client version (most modern clients support it)
Reference
- - Gotify API docs: https://gotify.net/docs/
- Gotify Android/iOS apps for receiving notifications
Gotify 通知技能
当长时间运行的任务完成或重要事件发生时,向您的 Gotify 服务器发送推送通知。
目的
此技能使 Clawdbot 能够通过 Gotify 发送推送通知,适用于:
- - 长时间运行的任务完成时发出警报
- 发送后台操作的状态更新
- 通知重要事件或错误
- 与任务完成钩子集成
设置
创建凭证文件:~/.clawdbot/credentials/gotify/config.json
json
{
url: https://gotify.example.com,
token: YOURAPPTOKEN
}
- - url:您的 Gotify 服务器 URL(末尾无斜杠)
- token:来自 Gotify 的应用令牌(设置 → 应用 → 创建应用)
用法
基本通知
bash
bash scripts/send.sh 任务成功完成
带标题
bash
bash scripts/send.sh --title 构建完成 --message 技能同步测试通过
带优先级(0-10)
bash
bash scripts/send.sh -t 严重警报 -m 服务宕机 -p 10
Markdown 支持
bash
bash scripts/send.sh --title 部署摘要 --markdown --message
部署完成
- - 状态:✅ 成功
- 耗时:2分34秒
- 提交数:5个新提交
与任务完成集成
选项 1:任务后直接调用
bash
运行长时间任务
./deploy.sh && bash ~/clawd/skills/gotify/scripts/send.sh 部署完成
选项 2:钩子集成(未来)
当 Clawdbot 支持任务完成钩子时,此技能可以自动触发:
bash
示例钩子配置(概念性)
{
on: task_complete,
run: bash ~/clawd/skills/gotify/scripts/send.sh 任务:{{task_name}} 在 {{duration}} 内完成
}
参数
- - -m, --message <文本>:通知消息(必需)
- -t, --title <文本>:通知标题(可选)
- -p, --priority <0-10>:优先级级别(默认:5)
- 0-3:低优先级
- 4-7:普通优先级
- 8-10:高优先级(可能触发声音/振动)
- - --markdown:在消息中启用 Markdown 格式
示例
子代理完成时通知
bash
生成子代理后
sessions_spawn --task 研究主题 --label my-research
... 等待完成 ...
bash scripts/send.sh -t 研究完成 -m 检查会话:my-research
错误时高优先级通知
bash
if ! ./critical-task.sh; then
bash scripts/send.sh -t ⚠️ 严重故障 -m 任务失败,请检查日志 -p 10
fi
丰富的 Markdown 通知
bash
bash scripts/send.sh --markdown -t 每日摘要 -m
系统状态
✅ 健康
- - UniFi:34 个客户端
- Sonarr:1,175 个节目
- Radarr:2,551 部电影
📊 统计
工作流程
当用户说:
- - 这个完成时通知我 → 在其命令中添加 && bash scripts/send.sh 任务完成
- 发送 Gotify 警报 → 使用其消息运行 bash scripts/send.sh
- 任务完成推送通知 → 使用适当的标题/优先级集成到其工作流程中
始终确认通知已成功发送(检查包含消息 ID 的 JSON 响应)。
注意事项
- - 需要网络访问您的 Gotify 服务器
- 应用令牌必须具有创建消息权限
- 优先级级别影响客户端设备上的通知行为
- Markdown 支持取决于 Gotify 客户端版本(大多数现代客户端支持)
参考
- - Gotify API 文档:https://gotify.net/docs/
- 用于接收通知的 Gotify Android/iOS 应用