Every 5 minutes
Get a Slack alert when a production deploy fails
When a production deployment errors, you hear about it within minutes with the project, branch and commit.
- Runs
- Every 5 minutes
- Apps
- Vercel
- AI
- Not needed
- Access
- read (token scoped to team)
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check my Vercel projects for production deployments that failed and post each one to #deploys in Slack with the project name, branch and commit message.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A developer merges to main at 4:50 on a Friday, Vercel starts the production build, and it fails on a type error that only shows up in the cloud environment. The Vercel dashboard marks the deployment red, but nobody is looking at it. The previous production deployment keeps serving, so the site seems fine, while the fix everyone thinks is live is not. The mistake is found Monday when a customer reports the old behavior.
Every five minutes the automation asks Vercel for deployments that reached the ERROR state since the last check, keeps only production ones, and posts each in Slack with the project and a link to the failed deployment. It stores the IDs it has already reported, so one failure produces exactly one message.
Small teams without a dedicated release engineer get the most out of it, since a failed build then has no obvious owner watching for it.
What you get out of it
Failed releases reach Slack within minutes
The five-minute check means a broken production build is announced shortly after it fails, while the person who pushed it is still at their desk and the diff is fresh in their mind, so the repair is quick.
Stop assuming the fix is live
Vercel keeps serving the last good deployment after a failure, which hides the problem. A Slack message corrects the false belief that a merged fix reached users, before anyone tells a customer it shipped.
Preview noise stays out of the channel
Only production failures are posted. Developers fail preview builds all day while iterating, and flooding the channel with those would train everyone to mute it and miss the alerts that actually matter.
One alert per failure, not a flood
Reported deployment IDs are remembered between runs, so a failure that sits in the list for hours does not repeat every five minutes and the channel stays readable for the conversation that follows it.
A trail of when things broke
Slack history shows the time each production build failed. During a postmortem you can answer how long a bad state lasted and who noticed first without digging through deployment logs across several projects.
How it works
What happens, step by step
Every five minutes ClickRuntime checks Vercel for deployments that errored since its last check.
It keeps only production deployments and skips any it has already reported.
Your Slack channel gets the project, branch and commit message of each failed deploy.
Before it runs live
- Connect Vercel
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
- 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
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", target="production", since=since)
report_fetched(len(failed))
if not failed:
return {"failed": 0}
for d in failed:
meta = d.get("meta", {})
notify.slack(f"Production deploy failed: {d['name']} ({meta.get('githubCommitRef', '?')})\n"
f"{meta.get('githubCommitMessage', '')}\nhttps://{d['url']}", channel="#deploys")
state.set("since", max(d["created"] for d in failed) + 1)
return {"failed": len(failed)}FAQ
Common questions
How quickly will I hear about a failed production deploy?
Does a canceled deployment trigger the alert?
Can the alert go to a different Slack channel per project?
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
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.
See how it worksGet a weekly deploy summary per project
Each Monday you see how many deployments succeeded and failed in every Vercel project last week.
See how it worksGet a Slack message when Vercel spend nears budget
When your bill reaches 50%, 75% or 100% of your budget, the team sees the current spend straight away.
See how it worksKeep exploring
Set up “Get a Slack alert when a production deploy fails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.