The moment it happens
Send error alerts to WhatsApp and Telegram
When a job fails, you get an alert on both WhatsApp and Telegram, with repeats held back.
- Runs
- The moment it happens
- Apps
- Telegram, WhatsApp Business
- AI
- Not needed
- Access
- bot token; whatsapp_business_messaging
Send this to your assistant
Create a ClickRuntime automation: when my jobs send an error to my trigger link, alert me on Telegram and with my WhatsApp alert template, but skip the same error if it was sent in the last 30 minutes.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A solo developer or small agency runs scheduled jobs for clients: imports, backups, syncs. When one fails overnight, the error goes to a log nobody reads, and the client notices before you do.
Sending each failure to both WhatsApp and Telegram makes sure it's seen on whichever app you check first, and holding back repeats keeps a broken job from flooding your phone.
What you get out of it
Seen on the app you check first
Two apps means the alert isn't missed if one is muted.
No floods
The same error is sent at most once every 30 minutes.
Details at a glance
Each alert names the job and the error message.
Works with anything
Any job or tool that can send a webhook can report failures.
How it works
What happens, step by step
A job sends its error to ClickRuntime.
If the same job and error were sent in the last 30 minutes, it's skipped.
You get a Telegram message with the job name and error.
You also get a WhatsApp alert using your approved template.
Before it runs live
- Connect Telegram
- Connect WhatsApp Business
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Telegram and WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
import time
from clickruntime import on_event, credentials, http, state
MY_CHAT = 123456789
MY_PHONE = "447700900123"
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa_template(to, name, params):
body = {"messaging_product": "whatsapp", "to": to, "type": "template", "template": {"name": name, "language": {"code": "en"},
"components": [{"type": "body", "parameters": [{"type": "text", "text": str(p)} for p in params]}]}}
return http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"}, json=body).json()
TG = "https://api.telegram.org"
def tg(chat_id, text):
http.post(f"{TG}/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": chat_id, "text": text})
@on_event
def handle(event):
e = event.json or {}
job, error = str(e.get("job", "job"))[:80], str(e.get("error", "failed"))[:300]
key = f"last:{job}:{error[:60]}"
if time.time() - (state.get(key) or 0) < 1800:
return {"skipped": "repeat"}
tg(MY_CHAT, f"❌ {job} failed: {error}")
wa_template(MY_PHONE, "job_failed", [job])
state.set(key, time.time())
return {"alerted": job}FAQ
Common questions
Why a template for WhatsApp?
How are repeats spotted?
Can the alert go to a group?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get new sales on Telegram and WhatsApp
Every new sale or order pings you on both Telegram and WhatsApp with the amount and what was bought.
See how it worksRun one support bot on WhatsApp and Telegram
Customers get the same answers whether they message your WhatsApp number or your Telegram bot, and questions the bot can't answer come to you.
See how it worksTell people on WhatsApp or Telegram when a Notion item changes status
When an item in your Notion database changes status, the person responsible is messaged on their preferred app.
See how it worksKeep exploring
Set up “Send error alerts to WhatsApp and Telegram” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.