Skip to content

Every 5 minutes

Send every failed deploy to the team channel

Any failed deploy in your team, preview or production, is posted for everyone to see along with who started it.

Runs
Every 5 minutes
Apps
Vercel
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check our Vercel team for any failed deployment, preview or production, and post it to #eng in Slack with the project, branch and the name of the person who deployed 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

Vercel's own failure emails go to the person whose commit triggered the build. That works until that person is on a flight, on vacation, or simply did not read email after pushing. A broken production deployment then sits unnoticed, because the only human who was told is the one least able to respond. Everyone else on the team finds out when a customer complains.

Every five minutes the automation lists deployments across all targets that ended in an error since its last check and posts them to a team Slack channel, naming the creator of each deployment and linking to the failed build. The deployer still gets their own notice, but now the whole team can see it and someone else can pick up the fix.

It matters most for teams with on-call rotations, contractors who push code, and projects where several people can fix a build but only one pushed it.

What you get out of it

  • A failure no longer depends on one inbox

    When the deployer is offline, the message in the team channel still gets read by somebody. The fix starts with whoever is around instead of waiting for the person who pushed to return from a flight or a day off.

  • Creator's name saves a round of questions

    Each alert says who triggered the deployment. A teammate can message that person directly with context, rather than asking the channel who pushed what and losing ten minutes before anyone starts looking at the logs.

  • Covers previews as well as production

    Because all targets are included, a failing preview that blocks a client review gets noticed too. Reviewers do not sit waiting on a link that will never build, and the designer is not left wondering why.

  • Fits on-call handoffs

    The on-call engineer sees every failed deployment during their shift, even those they did not cause. The handoff note to the next person can then list what broke, what was fixed and what is still red.

  • Less blame, more shared ownership

    A visible channel turns a failed build into a team task rather than one developer's private problem, which reduces the hesitation people feel about admitting a mistake and asking a colleague for help.

How it works

What happens, step by step

  1. Every five minutes ClickRuntime checks your Vercel team for deployments that failed since its last check.

  2. It includes both preview and production deploys, and skips any it has already posted.

  3. Your team's Slack channel gets the project, branch, whether it was preview or production, and who started the deploy.

Before it runs live

  • Connect Vercel

What you get

RunsEvery 5 minutes
Send every failed deploy to the team channeltoday, 9:00Succeeded
Slack · #engPreview deploy failed: storefront (feature/cart-v2), deployed by alexk

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

TEAM_ID = "team_your-team-id"

def deployments(**params):
    resp = http.get("https://api.vercel.com/v6/deployments", params={"teamId": TEAM_ID, "limit": 100, **params},
                    headers={"Authorization": f"Bearer {credentials.secret('VERCEL_TOKEN')}"})
    resp.raise_for_status()
    return resp.json()["deployments"]

@on_trigger
def run(event):
    since = state.get("since") or int(time.time() * 1000) - 5 * 60 * 1000
    failed = deployments(state="ERROR", since=since)
    report_fetched(len(failed))
    if not failed:
        return {"failed": 0}
    for d in failed:
        branch = d.get("meta", {}).get("githubCommitRef", "?")
        notify.slack(f"{(d.get('target') or 'preview').title()} deploy failed: {d['name']} ({branch}), "
                     f"deployed by {d['creator']['username']}\nhttps://{d['url']}", channel="#eng")
    state.set("since", max(d["created"] for d in failed) + 1)
    return {"failed": len(failed)}

FAQ

Common questions

How is this different from Vercel's built-in failure notifications?
Vercel notifies the committer of the failed deployment. This sends the failure, with the creator named, to a shared Slack channel, so people other than the committer see it as well. You can run both, and the committer still receives theirs.
Will every failed preview build fill the channel?
It can, since all targets are included. If preview failures are too frequent in your team, ask for the filter to be limited to one project or to production and the alert volume drops to something people will actually read.
Can the alert tag a specific person or user group?
Yes. The message can mention an on-call Slack user group or a named person, for example the platform team handle, so the alert actively notifies someone instead of only appearing in the channel where it may be scrolled past.
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 “Send every failed deploy to the team channel” from your assistant

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