DEVOPS

Stale Vercel Preview Reaper with Owner Grace Window

Finds Vercel preview deployments older than their TTL, pings the deploy owner in Slack with a grace window, then deletes any preview still stale after the window expires.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps7
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule fires
  • ActionList Vercel preview deployments + agesVercelVercel
  • LogicFilter previews past TTL and unpinned
  • ActionResolve deploy owner from GitHub commitGitHubGitHub
  • ActionDM owner with grace-window deadlineSlack
  • ActionPersist warning + deadline in PostgresPostgreSQLPostgres
  • OutputDelete previews past grace, notify ownerVercelVercel

What it does

Keeps your Vercel preview environments tidy by retiring deployments that have outlived their time-to-live. Owners get a heads-up and a grace window to keep a preview alive before it is torn down, so nothing important vanishes silently.

When to use it

When a busy team accumulates dozens of orphaned preview deploys per week, burning build minutes and cluttering the dashboard. Run it on a daily schedule to enforce a consistent TTL policy without manual cleanup.

How it works

  1. 1A daily schedule fires the workflow.
  2. 2List all Vercel preview deployments and read each one's created timestamp.
  3. 3A filter keeps only previews older than the configured TTL (e.g. 7 days) that are not pinned.
  4. 4For each stale preview, look up the Git author from the linked GitHub commit to find the owner.
  5. 5Send the owner a Slack DM naming the preview, its age, and the deletion deadline (e.g. 48h grace).
  6. 6Record the warning and deadline in Postgres so the next run knows the grace window has started.
  7. 7On a later run, any preview past its grace deadline is deleted via the Vercel API and the owner is notified it was reaped.

Set it up

What you configure once, before turning it on.

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