2.1 KiB
2.1 KiB
| tags | project | author | date | status | |||
|---|---|---|---|---|---|---|---|
|
Project Drogheda | Helgen CTO | 2026-06-20 | Active |
Mattermost notifications
There is no Mattermost MCP connector available (checked the connector registry),
so we post to Mattermost the simple, robust way: an Incoming Webhook + the
dependency-free notify_mattermost.py. No secrets in the repo — the webhook URL
lives in an environment variable.
One-time setup
- Create the webhook in Mattermost: Main Menu → Integrations → Incoming
Webhooks → Add Incoming Webhook. Choose the target channel (e.g.
#drogheda) and copy the URL:https://<your-mattermost>/hooks/xxxxxxxxxxxxxxxxx. (If "Integrations" is hidden, a System Admin must enable Incoming Webhooks in System Console → Integrations → Integration Management.) - Export the URL (add to your shell profile or a secrets manager — not git):
export MATTERMOST_WEBHOOK_URL="https://<your-mattermost>/hooks/xxxxxxxxxxxxxxxxx"
Use
python3 notify_mattermost.py "🛰️ Drogheda: anti-jump hotfix deployed ✅"
python3 notify_mattermost.py --channel drogheda --username "Drogheda Bot" "RTK fix restored on ZPM 020"
echo "line 1\nline 2" | python3 notify_mattermost.py - # read from stdin
python3 notify_mattermost.py --dry-run "test" # print payload, don't send
Markdown works in the message body (tables, bullets, code). The script exits 0
on success, 2 on config/usage error, 1 on a send failure.
Wire it into workflows
- Hackathon / CI: call it at the end of a deploy or test step.
- Backend health: the
htrackernotifier already does Discord+SMTP; a Mattermost sink can be added the same way, or pipe its events through this script. - Scheduled status: cron / launchd → a daily "fleet online/offline" digest.
If we later want richer two-way Mattermost integration (read channels, react to messages), build a small custom MCP with the
mcp-builderskill — but for push notifications the webhook above is sufficient and lower-maintenance.