The moment it happens
Get critical alerts by email and WhatsApp
When one of your systems reports a failure, you get an email and a WhatsApp message, without repeats for the same problem.
- Runs
- The moment it happens
- Apps
- Gmail, WhatsApp Business
- AI
- Not needed
- Access
- Gmail send; WhatsApp messaging
Send this to your assistant
Create a ClickRuntime automation: when my monitoring sends an alert to my trigger link, email me the details from Gmail and send me a WhatsApp alert, but don't repeat the same alert more than once an hour.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A failed backup, a stopped payment run or an unreachable server needs attention now, but an alert email can sit unread for hours. On the other hand, a WhatsApp ping alone doesn't hold the details you need to fix it.
Sending both, a quick WhatsApp to get your attention and an email with the full details, makes sure the alert is noticed and that you have what you need when you sit down to deal with it.
What you get out of it
Noticed straight away
WhatsApp gets your attention on your phone even when email is closed.
Details where you work
The email holds the full alert, ready to forward or file.
No alert storms
The same alert is sent at most once an hour, so a flapping system doesn't bury you.
Works with any monitor
Anything that can send a webhook can trigger it.
How it works
What happens, step by step
Your monitoring tool sends an alert to ClickRuntime.
It checks whether the same alert was already sent in the last hour, and skips it if so.
You get an email from your Gmail address with the full alert details.
You also get a WhatsApp alert with the title.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- 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 Gmail and WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64, json, time
from clickruntime import on_event, credentials, http, state
ME_EMAIL = "me@example.com"
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()
gmail = lambda: build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
def send_email(to, subject, text):
raw = base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\n\r\n{text}".encode()).decode()
gmail().messages().send(userId="me", body={"raw": raw}).execute()
@on_event
def handle(event):
alert = event.json or {}
title = str(alert.get("title") or alert.get("message") or "Alert")[:120]
key = f"last:{title}"
if time.time() - (state.get(key) or 0) < 3600:
return {"skipped": "repeat"}
send_email(ME_EMAIL, f"[ALERT] {title}", json.dumps(alert, indent=2)[:20000])
wa_template(MY_PHONE, "critical_alert", [title])
state.set(key, time.time())
return {"alerted": title}FAQ
Common questions
How are repeats detected?
Why use a WhatsApp template?
Can it alert several people?
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 each new Stripe sale by email and WhatsApp
Every completed Stripe checkout sends you an email with the details and a WhatsApp message with the amount.
See how it worksForward WhatsApp Business messages to Gmail
Each message a customer sends to your WhatsApp Business number is emailed from your Gmail to a chosen inbox, with the sender's name and number in the subject.
See how it worksAnswer customers on WhatsApp and email you what the bot can't
Customers get an instant answer on WhatsApp, and anything the bot can't handle is emailed to you with the conversation.
See how it worksKeep exploring
Set up “Get critical alerts by email and WhatsApp” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.