Every 5 minutes
Log outages in Supabase and get a diagnosis
When a site you watch fails, an incident row is written and you get an email with a short explanation of the likely cause.
- Runs
- Every 5 minutes
- Apps
- Supabase
- AI
- Yes, uses the built-in AI allowance
- Access
- secret key (write)
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes check example.com, app.example.com and api.example.com/health. If one fails, add a row to my Supabase incidents table and email me what probably went wrong.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A solo founder runs a web app and a handful of background jobs. When the site goes down at 2 a.m. or a nightly import throws an exception, nothing tells them until a customer writes in. Even then, the cause is a guess: was it the database, a deploy or a third-party API? Without a record of when it started and ended, the post-mortem is based on memory.
Every five minutes, ClickRuntime checks the URLs you list, or receives an error payload from a job, and inserts an incident row into Supabase. It then passes the text to ClickRuntime's built-in AI to suggest a likely cause from the error text and status code, sends the alert by email or Slack and logs the recovery time once the site responds again.
It suits indie developers and small teams who want monitoring and a history without paying for a full observability tool.
What you get out of it
Outages are noticed in minutes
A five-minute check means a crash at 2 a.m. reaches your phone before the morning rush. Shortening downtime protects revenue and reputation, particularly for apps that customers rely on for their own work.
A first diagnosis arrives with the alert
The AI note, such as a likely expired certificate or a database connection limit, gives you something to try before you open a laptop. Starting from a hypothesis shortens the time to a fix.
Every incident is stored in your own database
Rows with start time, end time, status and error text build an incident history you can query. Counting last quarter's outages or averaging recovery time becomes a simple SQL query.
Uptime can be demonstrated to customers
When a client asks how reliable your service is, you have real numbers rather than a guess. A log of incidents with durations supports honest answers and service level discussions.
Failed jobs are caught as well as websites
Because jobs can post their own errors, a silent failure of an import or an email batch is no longer silent. Problems that never show up on a status page still get logged and reported.
How it works
What happens, step by step
Every five minutes ClickRuntime checks the sites you list, or your app reports an error to it directly.
When a check fails, it writes an incident row to your Supabase table.
AI reads the error and writes a short explanation of the likely cause.
You get an email or Slack message with the address, the error and that explanation. When the site comes back, the recovery is logged too.
Before it runs live
- Connect Supabase
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Supabase steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify, state, ai
SUPABASE_URL = "https://your-project.supabase.co"
def sb_headers(**extra):
key = credentials.secret("SUPABASE_SECRET_KEY")
return {"apikey": key, "Authorization": f"Bearer {key}", **extra}
URLS = ["https://example.com", "https://app.example.com", "https://api.example.com/health"]
@on_trigger
def run(event):
down = state.get("down") or {}
for url in URLS:
try:
resp = http.get(url, timeout=10)
problem = None if resp.ok else f"HTTP {resp.status_code}: {resp.text[:300]}"
except Exception as e:
problem = f"{type(e).__name__}: {e}"
if problem and url not in down:
row = http.post(f"{SUPABASE_URL}/rest/v1/incidents", json={"url": url, "error": problem},
headers=sb_headers(Prefer="return=representation")).json()[0]
cause = ai.generate(f"{url} failed with: {problem}", system="In two sentences, say what probably went wrong.",
max_output_tokens=120).text
notify.email_me(f"DOWN: {url}", f"{problem}\n\n{cause}")
down[url] = row["id"]
elif not problem and url in down:
http.patch(f"{SUPABASE_URL}/rest/v1/incidents", params={"id": f"eq.{down.pop(url)}"},
json={"resolved_at": "now()"}, headers=sb_headers())
notify.email_me(f"RECOVERED: {url}", "The check is passing again.")
state.set("down", down)
return {"down": list(down)}FAQ
Common questions
How does it detect that my site is down?
Does the AI diagnosis always get the cause right?
How is a recovery recorded?
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 a daily summary of new feedback
One evening email grouping the day's feedback rows into themes, so you don't read each entry.
See how it worksFill a Supabase table from feeds on a schedule
New articles, prices or other public items land in your table every hour, with duplicates skipped.
See how it worksStop a free Supabase project from pausing
Your free project stays active, and you hear about it if the keep-alive query fails.
See how it worksKeep exploring
Set up “Log outages in Supabase and get a diagnosis” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.