All templates

Automated Optimizely Stale Flag Cleanup

Every Monday, WebRun opens Optimizely, walks the feature flags in each project and environment, picks out the ones at full rollout with no rule or variation change for weeks, posts a short cleanup list to Slack, and drafts a Gmail note to whoever owns each flag.

Runs on WebRun · Strict Lockdown policy
Every Monday at 10:00 AM WebRunorchestrates each step
1 Optimizely find flags at full rollout
2 Slack post the cleanup list
3 Gmail draft a note to each owner
In short

How do I find feature flags that have been fully rolled out and can be removed?

WebRun reviews your Optimizely feature flags every Monday. It finds flags left at full rollout with no rule change for weeks, posts the cleanup list to Slack, and drafts a Gmail note to each flag owner, so the codebase stops carrying dead branches nobody remembers writing.

  • Finished flags surface weekly instead of living in the code for a year
  • Every stale flag gets an owner and a written ask
  • Nothing is archived or deleted without an engineer saying yes

Built for engineering leads · platform teams · SaaS product teams · release managers

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.optimizely.com in a real browser with your saved login - no setup, no API keys.

  2. 1
    Optimizely - find flags at full rollout
    optimizely.com
    WebRun in Optimizely: find flags at full rollout
    WebRun opens Optimizely to find flags at full rollout.
    • Open Optimizely and list the feature flags in each project
    • Check the rollout rules per environment and find flags serving one variation to everyone
    • Read the last change date on each of those flags
    • Keep the ones untouched for longer than the age you set

    Done when Every flag at full rollout with no recent change is listed with its project and age.

  3. 2
    Slack - post the cleanup list
    slack.com
    WebRun in Slack: post the cleanup list
    WebRun opens Slack to post the cleanup list.
    • Post the week's cleanup list to the engineering channel
    • Sort it oldest first, with the project, the environment, and the days since last change
    • Note which flags are still referenced somewhere so nobody rips one out blind

    Done when The engineering team has this week's flag cleanup list in Slack.

  4. 3
    Gmail - draft a note to each owner
    gmail.com
    WebRun in Gmail: draft a note to each owner
    WebRun opens Gmail to draft a note to each owner.
    • Draft a short note to the owner of each stale flag with its name and age
    • Ask them to confirm the flag can come out of the code
    • Leave every message unsent in Drafts. You review and send

    Done when A draft email sits in Gmail for each flag owner, none of them sent.

Run settings

How is each run configured?

Starting pageWhere Chrome opens at the start of each run
app.optimizely.com
ScheduleRuns automatically on this cadence
Every Monday at 10:00 AM
DeliveryHow each run's result reaches you
Flag cleanup list · Slack
OutputWhat each run produces - A weekly list of Optimizely flags at full rollout with no recent change, showing project, environment, owner, and days since the last edit.
Text
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 archive or delete a flag?

No. WebRun only reads the flag list and reports which ones look finished. Archiving a flag or removing it from code stays with your engineers, because only they know what still references it.

Does it email owners on its own?

No. Each owner note is written and left unsent in Gmail Drafts. You read it, adjust the wording if you want, and press send yourself.

How old does a flag have to be?

You set the age, for example flags at full rollout with no rule change for 30 days. WebRun applies your number to every project and environment on each Monday run.

Put this on autopilot.

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