All templates

Automated LaunchDarkly Stale Flag Cleanup

On the first Monday of every month, WebRun opens LaunchDarkly, checks every flag across your environments for the last time it was toggled or evaluated, logs anything untouched for 90 days or more to a Notion cleanup page with its owner, and updates a Google Sheets flag inventory so the full list stays current.

Runs on WebRun · Strict Lockdown policy
First Monday of the month at 9:00 AM WebRunorchestrates each step
1 LaunchDarkly find flags nobody has touched in months
2 Notion log each one for cleanup
3 Google Sheets update the flag inventory sheet
In short

How do I find and clean up stale LaunchDarkly feature flags?

WebRun checks every LaunchDarkly flag once a month for the last time it was toggled or evaluated. It logs anything untouched for 90 days or more to a Notion cleanup page by owner, and keeps a full flag inventory current in Google Sheets, so stale flags get cleared out instead of piling up in your codebase.

  • Stale flags get a named owner and a cleanup entry every month
  • The flag inventory sheet never drifts out of date
  • Technical debt from old flags stops accumulating silently

Built for platform teams · engineering managers · software engineering teams · DevOps

Step by step

What does WebRun do on every run?

The exact actions WebRun takes, in order - in plain language, so you can adjust anything.

  1. WebRun signs in and gets to work

    Opens app.launchdarkly.com in a real browser with your saved login - no setup, no API keys.

  2. 1
    LaunchDarkly - find flags nobody has touched in months
    launchdarkly.com
    WebRun in LaunchDarkly: find flags nobody has touched in months
    WebRun opens LaunchDarkly to find flags nobody has touched in months.
    • Open LaunchDarkly and list flags across every environment
    • Check each flag's last toggle date and its owner
    • Flag anything untouched for 90 days or more as a cleanup candidate

    Done when Every flag untouched for 90 days or more is listed with its owner and environment.

  3. 2
    Notion - log each one for cleanup
    notion.so
    WebRun in Notion: log each one for cleanup
    WebRun opens Notion to log each one for cleanup.
    • Add each stale flag to the cleanup page with its owner and last activity date
    • Move any flag already removed since last month off the list
    • Group the list by owner

    Done when The Notion cleanup page lists every currently stale flag by owner.

  4. 3
    Google Sheets - update the flag inventory sheet
    google.com
    WebRun in Google Sheets: update the flag inventory sheet
    WebRun opens Google Sheets to update the flag inventory sheet.
    • Update the flag inventory sheet with the current full flag list and status
    • Mark which flags are newly flagged for cleanup this month
    • Keep the sheet as the single source of truth for what flags exist

    Done when The inventory sheet reflects every flag currently in LaunchDarkly and its cleanup status.

Run settings

How is each run configured?

Starting pageWhere Chrome opens at the start of each run
app.launchdarkly.com
ScheduleRuns automatically on this cadence
First Monday of the month at 9:00 AM
DeliveryHow each run's result reaches you
Flag cleanup list · Notion
OutputWhat each run produces - A Notion cleanup list of stale feature flags by owner, backed by a full flag inventory in Google Sheets.
Checklist
Setup & safety

Secure by default

Connect once, stays signed in

WebRun signs in once and keeps each session in a persistent environment, so every run picks up right where it left off.

Your credentials stay in your own private environment - WebRun never stores your passwords.
Strict Lockdown

Every action is checked against this policy before it runs.

Domains ALLOWLIST
Typed input ALLOW
Shell command BLOCK
File uploads BLOCK
Runs in a contained environment More on policies
Good to know

Questions, answered

Will it turn off or delete any flags?

No. WebRun only reports which flags look stale. Removing a flag from the code and LaunchDarkly is always done by an engineer.

How does it decide a flag is stale?

It checks the last time each flag was toggled or evaluated. Anything untouched for 90 days or more gets logged as a cleanup candidate.

What if a flag is meant to stay on forever?

Note it as a permanent flag in the Notion page and it stops appearing as a cleanup candidate on future runs.

Put this on autopilot.

Turn it on in minutes - or have our team set it up for you.