DEVOPS

Throttle preview deploys for branches that overrun their build-minute budget

Watches Vercel deployment events and, when a single branch burns more than its allotted build minutes in a rolling window, cancels in-flight preview builds for that branch…

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel deployment.created webhook firesVercelVercel
  • ActionRead rolling build-minute total for branchPostgreSQLPostgres
  • LogicIs branch over its build-minute budget?
  • ActionCancel in-flight preview deploymentVercelVercel
  • ActionRecord throttle event to audit tablePostgreSQLPostgres
  • OutputDM branch owner the cancellation reasonSlack

What it does

Caps the damage from a branch that redeploys on every push. It tracks build minutes consumed per branch over a rolling window, and once a branch crosses its budget it cancels the current preview build on Vercel and notifies the person who pushed it.

When to use it

Use it when one feature branch (or a misconfigured CI loop) quietly eats your monthly Vercel build minutes through dozens of preview rebuilds. Instead of finding out on the invoice, you stop the bleed in real time and tell the owner why.

How it works

  1. 1A Vercel deployment-created webhook fires on every new preview build.
  2. 2The flow reads recent build-minute totals for that branch from Postgres and adds the new build's estimate.
  3. 3A logic branch checks the running total against the branch's budget; under budget, it just records the build and exits.
  4. 4Over budget, it calls the Vercel API to cancel the in-flight deployment.
  5. 5It writes the throttle event back to Postgres for the audit trail.
  6. 6It posts a Slack DM to the branch owner naming the branch, minutes used, and that the build was cancelled.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.