Notifications¶
Get notified when Ralph starts, progresses, and completes work.
Overview¶
Ralph supports four notification channels:
| Platform | Setup Time | Best For |
|---|---|---|
| Slack | ~2 min | Team channels |
| Discord | ~1 min | Personal/community servers |
| Telegram | ~3 min | Mobile notifications |
| Custom | Varies | Proprietary systems |
Notifications fire when:
- Run starts
- Every 5 iterations (configurable via
RALPH_NOTIFY_FREQUENCY) - Work completes (when
RALPH_DONEis detected on its own line) - Max iterations reached
Quick Setup¶
Run the interactive wizard:
Test your configuration:
Platform Setup¶
Slack¶
- Go to api.slack.com/apps
- Create New App → From scratch
- Name it "Ralph", select your workspace
- Navigate to Incoming Webhooks
- Toggle Activate Incoming Webhooks ON
- Click Add New Webhook to Workspace
- Select your channel → Allow
- Copy the webhook URL
Optional:
export RALPH_SLACK_CHANNEL="#dev-alerts"
export RALPH_SLACK_USERNAME="Ralph Bot"
export RALPH_SLACK_ICON_EMOJI=":robot_face:"
Discord¶
- Open your Discord server
- Right-click channel → Edit Channel
- Integrations → Webhooks
- New Webhook → Name it "Ralph"
- Copy Webhook URL
Optional:
export RALPH_DISCORD_USERNAME="Ralph"
export RALPH_DISCORD_AVATAR_URL="https://example.com/avatar.png"
Telegram¶
Step 1: Create a bot
- Open Telegram, find @BotFather
- Send
/newbot - Follow prompts to name your bot
- Copy the token (format:
123456789:ABCdefGHI...)
Step 2: Get chat ID
- Start a chat with your new bot
- Send any message
- Visit:
https://api.telegram.org/bot<TOKEN>/getUpdates - Find
"chat":{"id":YOUR_ID}in the response
Note
Group chat IDs are negative numbers (e.g., -123456789)
Custom Script¶
For proprietary integrations—database bridges, internal APIs, SMS gateways.
Your script receives the message as $1:
#!/bin/bash
# my-notify.sh
MESSAGE="$1"
# Post to internal API
curl -X POST -d "text=$MESSAGE" https://internal.company.com/notify
# Or insert into database
docker exec db psql -c "INSERT INTO alerts (msg) VALUES ('$MESSAGE');"
Important
Script must be executable (chmod +x). Exit code is ignored.
Configuration Reference¶
| Variable | Platform | Description |
|---|---|---|
RALPH_SLACK_WEBHOOK_URL |
Slack | Webhook URL |
RALPH_SLACK_CHANNEL |
Slack | Override channel |
RALPH_SLACK_USERNAME |
Slack | Bot name |
RALPH_SLACK_ICON_EMOJI |
Slack | Bot icon |
RALPH_DISCORD_WEBHOOK_URL |
Discord | Webhook URL |
RALPH_DISCORD_USERNAME |
Discord | Bot name |
RALPH_DISCORD_AVATAR_URL |
Discord | Avatar image URL |
RALPH_TELEGRAM_BOT_TOKEN |
Telegram | Bot token |
RALPH_TELEGRAM_CHAT_ID |
Telegram | Target chat ID |
RALPH_CUSTOM_NOTIFY_SCRIPT |
Custom | Path to script |
RALPH_NOTIFY_FREQUENCY |
All | Notify every N iterations (default: 5) |
Persisting Configuration¶
The wizard saves to ~/.ralph.env. Load automatically:
Multiple Platforms¶
Configure as many as you want—Ralph sends to all configured channels:
export RALPH_SLACK_WEBHOOK_URL="https://..."
export RALPH_DISCORD_WEBHOOK_URL="https://..."
export RALPH_TELEGRAM_BOT_TOKEN="..."
export RALPH_TELEGRAM_CHAT_ID="..."