Every 15 minutes
Hear about failed Neon operations
When a Neon operation fails or errors, you get a message with the project and operation within 15 minutes.
- Runs
- Every 15 minutes
- Apps
- Neon
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, check recent operations in all my Neon projects and post any new failed or errored ones to #infra in Slack with the project name and action.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A Neon operation is anything the platform does to your project, such as starting a compute, creating a branch, applying a configuration change or restoring data. When one fails, the effect is subtle: a branch that never finished creating breaks a pull request's preview environment, or a compute that failed to start makes an app error out at 3am. The console shows failures only if you open the right project and the operations tab.
Every 15 minutes ClickRuntime lists recent operations for each project, picks out those with a status of failed or error, ignores ones it has reported before, and sends you a notification with the project, operation type and time. The check remembers what it has already told you, so one failure produces one alert.
It suits teams whose CI creates and deletes branches automatically and cannot easily see why a step broke.
What you get out of it
Broken previews are fixed fast
A failed create-branch operation is reported minutes later, so the developer sees why their preview has no database. They retry or fix the cause instead of waiting for a mystery timeout.
Startup failures get attention at once
A compute that cannot start can make a live application fail. A 15-minute check shortens the time before someone investigates from a customer complaint to a short alert. They can also check whether an environment variable or a branch name caused it.
One failure, one alert
Remembering reported operations means a problem is announced once, not every quarter hour. People trust the notification, because it does not repeat itself. People trust the notification because it never repeats itself.
Recurring errors form a pattern
Seeing the same operation fail across several projects points to a platform issue or a shared misconfiguration. That speeds up the decision to contact Neon support. Recurring failures point to a platform issue or a shared misconfiguration, and that speeds up contacting support.
Auditable operational history
The notifications and run history provide a record of failures with times. Postmortems can cite when the first failed operation appeared. Postmortems can cite the exact time the first failure appeared in the list.
How it works
What happens, step by step
Every 15 minutes ClickRuntime checks the recent operations in each of your Neon projects.
It keeps the ones that failed or errored and skips any it has already reported.
Your Slack channel gets the operation, the project and when it happened.
Before it runs live
- Connect Neon
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 Neon steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify, state, report_fetched
NEON = "https://console.neon.tech/api/v2"
def neon(method, path, **kwargs):
resp = http.request(method, f"{NEON}{path}", headers={"Authorization": f"Bearer {credentials.secret('NEON_API_KEY')}"}, **kwargs)
resp.raise_for_status()
return resp.json()
@on_trigger
def run(event):
seen = set(state.get("seen") or [])
failed = []
for p in neon("GET", "/projects")["projects"]:
for op in neon("GET", f"/projects/{p['id']}/operations", params={"limit": 50})["operations"]:
if op["status"] in ("failed", "error") and op["id"] not in seen:
failed.append((p["name"], op))
report_fetched(len(failed))
if not failed:
return {"failed": 0}
for name, op in failed:
notify.slack(f"Neon operation {op['status']}: {op['action']} in {name} ({op['created_at'][:16]})", channel="#infra")
state.set("seen", list(seen | {op["id"] for _, op in failed})[-500:])
return {"failed": len(failed)}FAQ
Common questions
How does it avoid repeat alerts?
What counts as a failed operation?
Can alerts go to Slack instead of email?
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 weekly Neon usage report
Each Monday you see compute hours and storage for every Neon project in one email.
See how it worksGet a warning before storage runs out
You get one alert when a project's storage passes the size you set, not a repeat every check.
See how it worksDelete old preview branches nightly
Preview branches past a set age are removed each night, and you get the list of what went.
See how it worksKeep exploring
Set up “Hear about failed Neon operations” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.