Triage failed Vercel deploys into GitHub issues and Slack
When a Vercel build fails, get a plain-English root cause, a tracked GitHub issue, and a Slack alert in the engineering channel within seconds.
I want an agent workflow that triages failed Vercel deployments so build errors do not just sit in the dashboard. Trigger: an incoming webhook from Vercel for the deployment.error event. Set up the workflow to receive that webhook payload and run on every failure.
When the webhook fires, pull the deployment id from the payload, then use Vercel's Get Deployment Events operation to fetch the build logs and Vercel's Get Deployment operation to grab the project name, branch, commit SHA, commit message, and commit author. From the build events, extract the lines that actually explain the failure. Trim aggressively: keep the last roughly 200 lines plus any line containing 'Error', 'error:', 'failed', or a stack trace. TypeScript errors, missing environment variables, install failures, lockfile mismatches, and OOM kills are the common patterns to look for.
Then write a concise root-cause summary in plain English (one or two sentences) plus a suggested fix (one or two sentences). Reference the specific file, line, package, or env var when the logs make that possible.
Next, use GitHub's Create an Issue operation to open an issue in the repository linked to the Vercel project. The issue title should include the project name and a short error summary, for example 'Vercel build failed on main: missing NEXT_PUBLIC_API_URL'. The issue body should contain the root-cause summary, the suggested fix, the trimmed log excerpt inside a fenced code block, the branch and commit SHA with a link to the commit on GitHub, the commit author, and a link back to the failed deployment on Vercel. Apply a 'deploy-failure' label and assign the commit author when they have a GitHub handle on file.
Finally, use Slack Bot's Send a Message operation to post a short alert into the team's engineering channel (make the channel configurable). The Slack message should be one or two lines: the project, branch, the one-sentence root cause, and two links, one to the failed Vercel deployment and one to the new GitHub issue. Keep it scannable. Do not paste the full log into Slack.
Suppress noise with a configurable filter: skip deployments on stale branches (no open pull request, or branch deleted), skip branches whose names match a configurable ignore list (for example 'dependabot/*', 'renovate/*'), and skip projects in a known-flaky list. If the same commit SHA fails again within an hour, update the existing GitHub issue with a comment and reply in the original Slack thread instead of opening a new issue and posting a new alert.
Inputs the user should configure when setting this up: the Slack channel name or id for alerts, the GitHub owner/repo to file issues into (or a map from Vercel project name to repo), the list of branch patterns to ignore, the list of project names to ignore, and the issue labels and default assignee.
Additional information
What does this prompt do?
- Listens for failed Vercel builds and reads the build log to figure out what actually broke.
- Writes a short root-cause summary and a suggested fix in plain English, with the project, branch, commit, and author included.
- Opens a GitHub issue in the right repository with the trimmed error log and a link back to the failed deploy.
- Posts a short alert in your engineering Slack channel linking to both the Vercel deploy and the new issue.
- Skips noise from stale branches and known flaky preview builds so the channel stays quiet on real work.
What do I need to use this?
- A Vercel account with permission to read deployments and configure outgoing webhooks.
- A GitHub login with access to the repository where issues should be filed.
- A Slack workspace with the General Input bot installed in your engineering channel.
How can I customize it?
- Change which Slack channel the alert posts to, or route different projects to different channels.
- Tune the noise filter so preview builds, dependabot branches, or specific authors do not page the team.
- Adjust the GitHub issue template, labels, or assignees so failures land in the right triage queue.
Frequently asked questions
Does this work on Vercel's Hobby plan?
Will it spam our channel on every preview build?
What goes into the GitHub issue?
Can I send alerts to more than one Slack channel?
What if the same build fails twice in a row?
Stop letting Vercel build failures sit in a dashboard.
Connect Vercel, GitHub, and Slack once, and Geni triages every failed deploy the moment it happens.