Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every morning, ClickRuntime lists the CircleCI pipelines that ran on main since yesterday.

  2. It looks at each pipeline's workflows and keeps the ones that failed or errored.

  3. 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

RunsDaily
See yesterday's failures on main each morningtoday, 9:00Succeeded
Email · Failed on main#1287 build-and-test (failed) https://app.circleci.com/pipelines/gh/acme/web-app/1287/workflows/…

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_a_daily_digest_of_failed_pipelines_on_main.pyexample
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?
The branch is part of the setup, and main is the default. Ask for a different branch such as release or develop and the pipeline listing step is updated, with the change shown for approval before it runs.
What counts as a failed workflow?
It keeps workflows whose status is failed or error. Success, running, on hold and cancelled workflows are left out, so the list is short and focused on things that need attention. This keeps the email short even after a busy week, because only broken workflows are included and the rest of the pipeline noise is skipped.
What CircleCI access does it need?
It needs a personal API token with read access to the project, stored as a secret. The automation only reads pipelines and workflows, so it cannot rerun builds or change settings. A token scoped to the project is enough for this, and it is stored as a secret so it does not show up in the email or the logs.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.