Cross-Channel Notify
Send a single notification to both email and iMessage with unified markdown formatting applied from config.
Workflow
- Collect inputs — recipient email, iMessage target (phone/email/chat_guid), and message content.
- Format content — apply markdown formatting rules from config (see Formatting below).
- Send email — use
himalayaCLI (himalaya message send). - Send iMessage — use the
messagetool withchannel: "bluebubbles". - Report results — confirm delivery status per channel; surface any failures clearly.
If any channel fails, report the failure but still attempt the remaining channels. Never silently skip a channel.
Formatting
Content is formatted according to rules defined in config. The formatting script at scripts/format_message.sh applies these rules:
- Normalize line breaks and whitespace
- Apply config-specified heading styles (ATX vs underline)
- Convert raw URLs to markdown links
- Strip disallowed HTML (configurable allowlist)
- Enforce max line length (default 80 chars, configurable)
Config location: ~/.config/cross-channel-notify/config.sh
If no config exists, the script uses sensible defaults and creates a template config on first run. See references/config-reference.md for all options.
Sending Email (himalaya)
himalaya message send \
--from "sender@example.com" \
--to "recipient@example.com" \
--subject "Notification Subject" \
< formatted_message.md
- For HTML email, pipe through a markdown-to-html converter first (e.g.,
pandoc -f markdown -t html). - Himalaya must be configured with IMAP/SMTP credentials. See himalaya skill for setup.
Sending iMessage (BlueBubbles)
{
"action": "send",
"channel": "bluebubbles",
"target": "+15551234567",
"message": "<formatted message text>"
}
- Prefer
chat_guid:...fortargetwhen available. - BlueBubbles channel must be configured in OpenClaw config.
Channel-Specific Adaptations
| Aspect | iMessage | |
|---|---|---|
| Subject | Required | Ignored (prepend as bold first line) |
| Attachments | Via himalaya MML | Via message tool path/buffer |
| Length | No practical limit | Keep concise |
| Formatting | Markdown → HTML recommended | Plain text; strip markdown syntax |
When sending to iMessage, strip markdown formatting to plain text. The formatted (markdown) version goes to email.
Error Handling
- If himalaya is not installed or not configured: report the error, skip email, still send iMessage.
- If BlueBubbles channel is not configured: report the error, skip iMessage, still send email.
- If both fail: report both errors clearly.
Quick Example
User: "Notify alice@example.com and +15551234567 that the deployment is done"
- Format the message per config rules.
- Send email via himalaya with subject "Deployment Complete".
- Send iMessage via BlueBubbles with plain-text version.
- Confirm: "✅ Sent to both email and iMessage."
References
references/config-reference.md— full config options for formatting rules