DEVOPS

Auto-suspend stale preview environments

Scans Vercel preview deployments daily, finds preview environments tied to branches with no activity past a staleness window, deletes or disables them.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule
  • ActionList active Vercel preview deploymentsVercelVercel
  • LogicFlag previews past staleness window
  • ActionDelete or disable stale previewsVercelVercel
  • OutputLog suspended environments to SlackSlack

What it does

This workflow reclaims build and bandwidth budget by retiring preview environments nobody is using. Each day it lists active preview deployments, identifies those whose branch has been idle longer than your staleness window, suspends or deletes them, and reports what it cleaned up.

When to use it

Use it when abandoned feature branches leave dozens of live preview URLs running and accumulating cost. Ideal for teams that open many short-lived branches and rarely clean up after merge or abandonment.

How it works

  1. 1A daily schedule triggers the run.
  2. 2Vercel returns the current set of preview deployments with their branch and last-updated timestamp.
  3. 3A logic step flags any deployment whose branch has been inactive beyond the staleness threshold (for example 14 days).
  4. 4For each stale deployment, a Vercel action deletes or disables the preview environment.
  5. 5A Slack message lists every suspended environment, its branch, age, and the deployment id needed to restore it.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    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.