Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Your monitoring tool sends an alert to ClickRuntime.

  2. It checks whether the same alert was already sent in the last hour, and skips it if so.

  3. You get an email from your Gmail address with the full alert details.

  4. 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

RunsThe moment it happens
Get critical alerts by email and WhatsAppjust nowSucceeded
WhatsApp · TemplateCritical alert: Nightly backup for Northwind CRM failed. Details sent to your email.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
critical_alerts_by_email_and_whatsapp.pyexample
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?
Alerts with the same title or source within an hour are treated as repeats and skipped.
Why use a WhatsApp template?
If you haven't messaged your business number in the last 24 hours, WhatsApp only allows an approved template. The template keeps alerts arriving reliably.
Can it alert several people?
Yes. List several email addresses and phone numbers.
What permissions does it need?
Gmail send; WhatsApp messaging. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.