Skip to content

Every 5 minutes

Tell the team in Slack when a Heroku release fails

A failed release is posted to your team channel, so it isn't only the person who pushed who knows.

Runs
Every 5 minutes
Apps
Heroku
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes check releases for my Heroku app 'shop-api-prod' and post to #deploys in Slack whenever one fails, with the version and who released it.

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 Heroku, a deploy can fail in ways that only the person who pushed notices. A release phase command errors out, a migration times out, a buildpack fails, and the app keeps running the previous version. Everyone assumes the new feature is live. The developer who pushed it is in a meeting, the product manager tells a customer it shipped, and the discrepancy surfaces hours later when someone asks why the change is not there.

Every 5 minutes, recent releases for your apps are listed, those with a failed status are kept, and a message tells the team, with the app name and the release version. Because it goes to a shared channel, not only to whoever ran git push, the problem has several pairs of eyes quickly.

It suits teams where several people deploy, or where deploys are triggered from CI or Git integrations.

What you get out of it

  • Failed deploys are fixed quickly

    A shared alert gets someone on it within minutes, so the app does not sit on an old version while the team believes the new one is live. That shortens the time between a broken deploy and a working one.

  • Nobody promises a feature that did not ship

    Product and support teams learn when a release failed, which stops them from telling customers a fix is out when it is not. A wrong promise to a customer is far harder to repair than a short delay.

  • Pushes from CI are covered too

    A deploy triggered by GitHub or a pipeline does not always notify a person. A shared message makes sure someone sees every failure, whoever started it. This matters on teams where auto-deploy from the main branch means nobody is watching the push.

  • Failed migrations are caught early

    Release phase failures, such as a migration that times out, can leave a database half-changed. Seeing them promptly limits the damage. Fixing a half-applied change within minutes is much safer than finding out next morning.

  • The whole team shares context

    With a channel record of failed releases, patterns become visible, such as a flaky release command that fails every few days. Fixing such flaky steps permanently saves hours of wasted deploys over a quarter.

How it works

What happens, step by step

  1. Every five minutes ClickRuntime checks the recent releases of your Heroku app.

  2. It keeps only the ones that failed and skips any it has already posted.

  3. Your team's Slack channel gets the release number, app, who released it and its description.

Before it runs live

  • Connect Heroku

What you get

RunsEvery 5 minutes
Tell the team in Slack when a Heroku release failstoday, 9:00Succeeded
Slack · #deploysRelease v412 of shop-api-prod failed, released by deploys@acme.example: Deploy 3f9c2a1

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 Heroku 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_alerted_on_failed_releases.pyexample
from clickruntime import on_trigger, credentials, http, notify, state, report_fetched

HEROKU = "https://api.heroku.com"

def heroku(path, **headers):
    resp = http.get(f"{HEROKU}{path}", headers={"Accept": "application/vnd.heroku+json; version=3",
                    "Authorization": f"Bearer {credentials.secret('HEROKU_API_KEY')}", **headers})
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    releases = heroku("/apps/shop-api-prod/releases", Range="version ..; order=desc,max=20")
    last = state.get("last_version") or 0
    new = [r for r in releases if r["version"] > last]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    for r in new:
        if r["status"] == "failed":
            notify.slack(f"Release v{r['version']} of shop-api-prod failed, released by {r['user']['email']}: {r['description']}", channel="#deploys")
    state.set("last_version", max(r["version"] for r in new))
    return {"new": len(new)}

FAQ

Common questions

Does it alert on successful releases?
No, only on failures. Posting every success would make the channel noisy, so a failure is a rare, clear signal. A separate post for successful production releases can be added if you want that. Quiet success is the point.
How fast will I hear about a failed release?
Within about 5 minutes of the failure, since releases are checked on that interval. It is polling, not an instant push, which is quick enough for deploy problems but not for incidents measured in seconds.
Which apps are watched?
Every app visible to the connected token by default, or just the ones you name. Many teams limit it to production apps so failures on short-lived review apps do not cause alerts. Listing production apps only is a short edit.
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 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 “Tell the team in Slack when a Heroku release fails” from your assistant

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