Daily
See 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.
- Runs
- Daily
- Apps
- CircleCI
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every weekday at 8am, email me the CircleCI workflows on main that failed or errored yesterday, with a link to each.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
On a busy repository, main is supposed to be green. In practice a broken merge at 6 p.m. is followed by a flaky rerun, someone else's hotfix, and by morning nobody remembers which workflow failed or whether it was fixed. The next developer to pull main inherits a red build and a lost half hour finding out why.
Each morning, this looks at the CircleCI pipelines that ran on main since yesterday, checks the workflows inside each pipeline, keeps only the ones that ended failed or in error, and emails you a single list. You start the day knowing what broke overnight, with no dashboard to open.
It is particularly handy for engineering managers and release owners who are not in CircleCI every day but still answer for the state of main. The digest is assembled from CircleCI's own pipeline and workflow data, so the entries match what the team would find in the dashboard, only gathered into one message.
What you get out of it
Start the day knowing main's health
A morning email separates a clean night from a bad one. A release owner can decide at 9 a.m. whether to hold merges instead of finding out at the standup that main has been red since yesterday.
Catch failures that someone silently reran
A failure that passes on rerun still points to a real problem. The digest lists the failed workflow even if it was later retried, so a recurring flaky job does not hide behind green final results.
Cut the interruptions about broken builds
When the list is already in your inbox, fewer people ask in chat whether main is broken. Developers check one email instead of pinging each other, and the on-call engineer gets uninterrupted focus.
Give managers a view without CircleCI access
A non-engineer can read a plain email of failed workflows. That makes it easy to share with a product owner who needs to know why a release is delayed, without teaching them to read pipelines.
Build a history of overnight trouble
Because the email arrives daily, scanning back a month shows which workflows keep appearing. That is useful evidence when you argue for time to fix a persistent pipeline problem. That kind of history makes the priority case for pipeline repairs obvious when planning the next sprint.
How it works
What happens, step by step
Every morning, ClickRuntime lists the CircleCI pipelines that ran on main since yesterday.
It looks at each pipeline's workflows and keeps the ones that failed or errored.
You get one email listing each failed workflow with its pipeline number and a link to the run. If nothing failed, there's no email.
Before it runs live
- Connect CircleCI
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 CircleCI steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify
PROJECT = "gh/acme/web-app"
@on_trigger
def run(event):
headers = {"Circle-Token": credentials.secret("CIRCLECI_TOKEN")}
today = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0, microsecond=0)
start = today - timedelta(days=1)
pipelines = http.get(f"https://circleci.com/api/v2/project/{PROJECT}/pipeline",
params={"branch": "main"}, headers=headers).json()["items"]
failed = []
for p in pipelines:
created = datetime.fromisoformat(p["created_at"].replace("Z", "+00:00"))
if not start <= created < today:
continue
for wf in http.get(f"https://circleci.com/api/v2/pipeline/{p['id']}/workflow", headers=headers).json()["items"]:
if wf["status"] in ("failed", "error"):
failed.append(f"#{p['number']} {wf['name']} ({wf['status']})\n "
f"https://app.circleci.com/pipelines/{PROJECT}/{p['number']}/workflows/{wf['id']}")
notify.email_me(f"{len(failed)} failed workflows on main yesterday", "\n".join(failed) or "All green.")
return {"failed": len(failed)}FAQ
Common questions
Does it check branches other than main?
What counts as a failed workflow?
What CircleCI access does it need?
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 worksFind the jobs that got slower this week
Each week you see which jobs in a workflow got slower or less reliable compared with the week before.
See how it worksKeep exploring
Set up “See yesterday's failures on main each morning” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.