DEVOPS

Reap Previews When Vercel Spend Crosses a Budget Threshold

When monthly Vercel usage exceeds a budget alert, ranks live preview deployments by age and cost, posts a teardown plan to Slack for one-click approval.

CategoryDevOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerBudget-threshold webhook firesHTTP webhook
  • ActionList previews with age + usageVercelVercel
  • LogicRank + build teardown plan to target
  • ActionPost plan to Slack for approvalSlack
  • LogicBranch on approve vs skip
  • OutputDelete approved previews, report savingsVercelVercel

What it does

Treats preview cleanup as a budget control. When Vercel spend trips a threshold, it assembles a ranked teardown plan of the oldest, costliest previews and asks an operator to approve before reaping, so cost is reined in deliberately rather than blindly.

When to use it

When preview environments are a real line item and you want spend-driven cleanup with a human in the loop, rather than a fixed TTL. Ideal for teams that batch-clean only when they are actually over budget.

How it works

  1. 1A budget webhook (from your billing alert) fires when Vercel spend crosses the threshold.
  2. 2List all live preview deployments with age and resource usage from the Vercel API.
  3. 3Logic ranks previews oldest-and-costliest first and builds a teardown candidate list down to the target savings.
  4. 4Post the ranked plan to Slack with approve/skip controls and wait for an operator decision.
  5. 5A branch proceeds only on approval; a skip ends the run with the plan logged.
  6. 6Delete the approved previews via the Vercel API and post the realized savings summary back to Slack.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect VercelDeploys, runtime logs, analytics.
  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.