The moment it happens
Get told the moment main fails
When a workflow on main ends in failure or error, you get the workflow name and a direct link right away.
- Runs
- The moment it happens
- Apps
- CircleCI
- AI
- Not needed
- Access
- project webhook setup (one-time); read
Send this to your assistant
Create a ClickRuntime automation: give me a webhook link for my CircleCI project. When a workflow on main finishes as failed or error, email me the project, workflow name and a link to it.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The most expensive build failure is the one that is noticed late. Someone merges to main before lunch, the CircleCI workflow fails ten minutes later, and the author has already moved on to another task. By the time a teammate pulls main and hits the problem, three more commits are stacked on top of the broken one.
As soon as CircleCI reports that a workflow finished, this checks whether its status is failed or error on the branch you chose, and ignores everything else. Only genuine failures on that branch result in a notification, so the channel stays quiet on ordinary green builds.
It works best on main or release branches, where a red build blocks the whole team rather than one developer's pull request. The check happens as the event arrives, so the filtering costs nothing and nobody receives a message about a build that passed or a branch they never touch.
What you get out of it
Fix the broken commit while it is fresh
The author still remembers what they changed minutes after the failure. A quick notification shortens the path from breaking main to reverting or fixing it, before more commits pile on top. A small revert is much easier than untangling several commits that were built on top of a broken one.
Keep main deployable
If releases ship from main, every minute it stays red is a minute you cannot ship a hotfix. Immediate alerts keep that window small and the release path available. That protects both urgent fixes and planned releases, because the team knows main is healthy before cutting anything from it.
Filter out noise from feature branches
Only the branch you choose triggers a message. Developers do not get alerts about their colleagues' experimental work, so the notification keeps its meaning and people do not mute it. Quiet channels get read, which is the whole point of filtering by branch and status instead of posting every result.
Make the whole team aware at once
A shared notification means everyone knows main is broken without checking individually. That prevents several people each pulling, failing, and debugging the same problem in parallel. People then stop discovering the failure one by one, and the first person to see it can tell the rest.
Create a clear incident record
Each alert carries the time of the failure. Later, when reviewing how long main was red, you have precise timestamps instead of relying on a vague memory of the afternoon. It is the easiest way to review afterwards how long an incident lasted and which commit caused it.
How it works
What happens, step by step
Each time a CircleCI workflow finishes, CircleCI tells ClickRuntime straight away.
It ignores workflows on other branches and any that succeeded, keeping only failures or errors on main.
You get an email right away with the project, the workflow name and a direct link to the failed run.
Before it runs live
- Connect CircleCI
- Paste your automation's link into the other app's webhook settings
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 CircleCI steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, notify
@on_event
def handle(event):
body = event.json or {}
if body.get("type") != "workflow-completed":
return {"skipped": "not a workflow event"}
wf = body["workflow"]
branch = body.get("pipeline", {}).get("vcs", {}).get("branch")
if branch != "main" or wf["status"] not in ("failed", "error"):
return {"skipped": f"{branch} {wf['status']}"}
notify.email_me(f"CircleCI {wf['status']}: {body['project']['name']} / {wf['name']}",
f"Project: {body['project']['name']}\nWorkflow: {wf['name']}\nStatus: {wf['status']}\n{wf['url']}")
return {"emailed": True}FAQ
Common questions
Does it alert on cancelled workflows?
How fast does the alert arrive?
Do I configure something in CircleCI?
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 build health report
Every Monday you see each workflow's success rate and typical duration for the past week.
See how it worksGet the week's flaky tests on Friday
Each Friday you get the tests CircleCI has marked as flaky, so someone can fix them.
See how it worksSee yesterday's failures on main each morning
One email each morning lists the workflows on main that failed the day before, with links, and needs no webhook.
See how it worksKeep exploring
Set up “Get told the moment main fails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.