Every 5 minutes
Monitor your site and update a GitHub status page
If your site goes down you get an email within five minutes, and the status page you host on GitHub updates itself, then again when the site is back.
- Runs
- Every 5 minutes
- Apps
- GitHub, Gmail
- AI
- Not needed
- Access
- contents:write; gmail.send
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check https://app.acme.example; when it goes down or recovers, update status.json in acme/status and email me.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small software company hosts a simple status page on GitHub Pages, but nobody remembers to update it during an outage. Customers see 'All systems operational' while the app is down, which is worse than having no page at all.
Checking the site every five minutes and updating the status file automatically keeps the page honest. The team gets an email at the same moment, so they are fixing the problem while customers already know it is being handled.
What you get out of it
A status page that tells the truth
The page changes when the site does, without anyone remembering. Customers trust a page that reflects reality.
You hear first
An email within minutes of the outage means you are working on it before support tickets pile up.
Fewer 'is it down?' emails
Customers who can see the status for themselves do not need to ask. Support has more time during an incident.
History in the commits
Every status change is a commit with a time. The repository becomes a record of outages and how long they lasted.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime visits your site and checks that it responds.
It compares the result with the last check, which it remembers.
When the site goes down or comes back, it updates the status file in your GitHub repository, which refreshes your status page.
You get an email at each change.
Before it runs live
- Connect GitHub
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
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 GitHub and Gmail steps into one automation
Under the hood
The code that runs this automation
import base64, json
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, notify, state
def gh(method, path, **kw):
resp = http.request(method, f"https://api.github.com{path}", headers={
"Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
return resp.raise_for_status() or (resp.json() if resp.content else None)
URL, REPO, PATH = "https://app.acme.example", "acme/status", "status.json"
@on_trigger
def run(event):
try:
up = http.get(URL, timeout=10).status_code < 500
except Exception:
up = False
if state.get("up") == up:
return {"up": up, "changed": False}
now = datetime.now(timezone.utc).isoformat(timespec="minutes")
current = gh("GET", f"/repos/{REPO}/contents/{PATH}")
body = json.dumps({"status": "operational" if up else "outage", "updated": now}, indent=2)
gh("PUT", f"/repos/{REPO}/contents/{PATH}", json={"message": f"Status: {'operational' if up else 'outage'}",
"content": base64.b64encode(body.encode()).decode(), "sha": current["sha"]})
notify.email_me(f"{URL} is {'back up' if up else 'DOWN'}", f"Status page updated at {now}.")
state.set("up", up)
return {"up": up, "changed": True}FAQ
Common questions
What does the status page need to look like?
Does a single slow response count as down?
Can it check several services?
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
Draft your weekly timesheet from email and commits
Every Friday you get an email with a draft timesheet, grouped by client and task, built from the emails you sent and the code you committed that week.
See how it worksEmail a weekly changelog from merged pull requests
Every Friday you get a customer-friendly changelog written from the week's merged pull requests, with any risky changes flagged for a second look.
See how it worksOpen GitHub issues from failed backup emails
When a backup or scheduled job emails a failure report, a GitHub issue is opened with the details and you get an email with the link.
See how it worksKeep exploring
Set up “Monitor your site and update a GitHub status page” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.