send-verified-health-whatsapp.sh
Sends only verified health results — guards against false-positive "all good" messages.
Note
Live script from my home-lab server. Tokens, IDs, phone numbers and other secrets have been replaced with
placeholders like
<WHATSAPP_GROUP_ID> — everything else is the real, running code.
#!/usr/bin/env bash
set -euo pipefail
report=$(/home/lanky/scripts/whatsapp-health-check.sh)
message=$(printf '%s\n\n%s' \
'CORRECTION: The previous automated health response was invalid because it did not run the health script. This is the verified current report:' \
"$report")
openclaw message send \
--channel whatsapp \
--target <ADMIN_PHONE> \
--message "$message" \
--json