Skip to content

Every 5 minutes

Get a Telegram alert when a GitHub Actions run fails

Every 5 minutes ClickRuntime checks your repos for failed GitHub Actions runs and sends a Telegram message with the branch, commit and a link to the logs.

Runs
Every 5 minutes
Apps
GitHub, Telegram
AI
Not needed
Access
GitHub Actions read (actions:read) or OAuth repo; bot token

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check my GitHub repos for failed Actions runs and send me a Telegram message with the workflow name, branch, who triggered it, the commit message and a link to the run.

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

GitHub emails failed runs to the person who pushed, and those emails are easy to miss. When a deploy to main fails at the end of the day, the rest of the team often finds out from a customer.

This automation watches the repos you choose and sends a Telegram message as soon as the check sees a failed run, with enough detail to know whether it matters and a link straight to the logs.

It suits small dev teams and solo developers who already use Telegram for team chat and want CI failures in front of them without adding notifier steps to every workflow.

What you get out of it

  • Failures reach you quickly

    A message on your phone within minutes, instead of an email you read the next morning.

  • No workflow edits

    Works across all workflows in a repo without adding a notification step or storing a bot token in GitHub secrets.

  • Enough context to triage

    Branch, author and commit message tell you if it is your change or a flaky test.

  • Each failure once

    Runs already reported are remembered, so retries do not repeat old alerts.

  • Covers several repos

    List all your repos in one place and get one stream of CI alerts.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime asks GitHub for failed workflow runs in the repos you list.

  2. It skips any run it has already reported.

  3. For each new failure it sends a Telegram message with the workflow, branch, person who triggered it and the commit message.

  4. A link in the message opens the run's logs on GitHub.

Before it runs live

  • Connect GitHub
  • Connect Telegram

What you get

RunsEvery 5 minutes
Get a Telegram alert when a GitHub Actions run failstoday, 9:00Succeeded
Telegram · CI alerts❌ deploy failed on acme/web Branch: main · by jlee "Bump stripe to 15.2" https://github.com/acme/web/actions/runs/11873309912

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

  • 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 GitHub and Telegram 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_telegram_alert_when_a_github_actions_run_fails.pyexample
from clickruntime import on_trigger, credentials, http, state

REPOS, CHAT_ID = ["acme/web", "acme/api"], "123456789"

def gh(method, path, **kw):
    r = http.request(method, f"https://api.github.com{path}", headers={
        "Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
    r.raise_for_status()
    return r.json() if r.content else None

def tg(method, **params):
    r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
    r.raise_for_status()
    return r.json()["result"]

@on_trigger
def run(event):
    seen = set(state.get("seen") or [])
    first_run = not seen
    sent = 0
    for repo in REPOS:
        runs = gh("GET", f"/repos/{repo}/actions/runs", params={"status": "failure", "per_page": 20})["workflow_runs"]
        for r in runs:
            if r["id"] in seen:
                continue
            seen.add(r["id"])
            if first_run:
                continue  # don't alert on old failures the first time
            commit = (r.get("head_commit") or {}).get("message", "").splitlines()[0][:80]
            tg("sendMessage", chat_id=CHAT_ID, disable_web_page_preview=True,
               text=f"❌ {r['name']} failed on {repo}\nBranch: {r['head_branch']} · by {r['actor']['login']}\n\"{commit}\"\n{r['html_url']}")
            sent += 1
    state.set("seen", list(seen)[-1000:])
    return {"alerts": sent}

FAQ

Common questions

Do I need to change my workflow files?
No. The automation reads run results through the GitHub API, so nothing is added to your repos or Actions minutes.
Will it tell me when the build is fixed?
Not in this version. Ask your assistant to also check the next run on the same branch and workflow and send a short "back to green" message when it passes.
Can I limit it to the main branch?
Yes. Ask for alerts only on main or release branches, and failures on feature branches will be skipped.
What permissions does it need?
GitHub Actions read (actions:read) or OAuth repo; bot token. 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 checks. Checks that find nothing new 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 “Get a Telegram alert when a GitHub Actions run fails” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.