Every 5 minutes
Monitor endpoints from a sheet with WhatsApp alerts
The addresses in your sheet are checked every 5 minutes, their status is written back, and you get a WhatsApp message when one fails or recovers.
- Runs
- Every 5 minutes
- Apps
- Google Sheets, WhatsApp Business
- AI
- Not needed
- Access
- Sheet edit; whatsapp_business_messaging
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check each URL in my Endpoints sheet, write its status in the next column, and WhatsApp me when one goes down or comes back.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small development team runs a handful of APIs and websites for clients. When one goes down at night, nobody knows until a client complains in the morning, and the team has no record of how long it was out.
Checking every 5 minutes and messaging the on-call phone on WhatsApp means problems are spotted quickly, while the status column in the sheet gives anyone a quick view of what's up right now.
What you get out of it
Hear about outages fast
A WhatsApp message arrives within minutes of a failure, even at night.
A live status board
The sheet shows the current status and last check for every endpoint. Anyone can look.
Only changes alert you
You get one message when something fails and one when it recovers, not one every 5 minutes.
Add an endpoint in seconds
New addresses are a new row in the sheet.
How it works
What happens, step by step
Every 5 minutes it reads the list of addresses from your sheet.
Each address is checked to see if it responds without an error.
The status and time of the check are written back to the sheet.
If an address has gone down or come back since the last check, you get a WhatsApp message.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect WhatsApp Business
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
- Run it at a different time, more or less often, or only on weekdays
- 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 Google Sheets 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
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state
SHEET_ID = "your-spreadsheet-id"
MY_PHONE = "447700900123"
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa(to, text):
http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
@on_trigger
def run(event):
vals = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
urls = [r[0] for r in vals.get(spreadsheetId=SHEET_ID, range="Endpoints!A2:A").execute().get("values", []) if r]
last, now, out = state.get("status") or {}, {}, []
stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M")
for url in urls:
try:
now[url] = http.get(url, timeout=10).status_code < 500
except Exception:
now[url] = False
if url in last and last[url] != now[url]:
wa(MY_PHONE, f"{'✅' if now[url] else '🔴'} {url} is {'back up' if now[url] else 'DOWN'}")
out.append(["up" if now[url] else "down", stamp])
vals.update(spreadsheetId=SHEET_ID, range=f"Endpoints!B2:C{len(urls) + 1}", valueInputOption="RAW", body={"values": out}).execute()
state.set("status", now)
return {"checked": len(urls)}FAQ
Common questions
What counts as a failure?
Can it check endpoints that need a key?
Can several people get the alerts?
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
Send WhatsApp messages to everyone in a sheet
Everyone marked pending in your sheet gets a personalised WhatsApp template message, and the sheet records whether it was sent.
See how it worksGet a WhatsApp alert when a sheet value crosses a limit
When a number you track in your sheet goes past its limit, you get one WhatsApp message about it.
See how it worksSend WhatsApp reminders on the dates in a sheet
People in your sheet get a WhatsApp reminder on the day you set, and the sheet marks it as sent.
See how it worksKeep exploring
Set up “Monitor endpoints from a sheet with WhatsApp alerts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.