Android Feature Flag Cleanup Automation
This workflow automatically scans an Android GitHub repository, detects feature flags used in the codebase, compares them with Firebase Remote Config flags, identifies unused flags and sends a weekly cleanup report to Slack.
This workflow runs every week and checks Android source files (.kt / .java) inside your GitHub repository. It finds possible feature flags used in code, compares them with Firebase Remote Config flags and highlights flags that may no longer be used.
It then builds a clean summary report and sends the result to Slack for team review.
You receive:
- Weekly automated Android flag audit
- Unused Firebase flag detection
- Slack summary report for cleanup review
- Better visibility of active vs stale flags
Ideal for Android teams who want cleaner Firebase Remote Config management.
Quick Start – Implementation Steps
- Login to your n8n account.
- Add your GitHub credential in n8n.
- Update repository owner, repo name and branch.
- Add Slack credentials and choose a channel.
- Add Firebase Remote Config API later (currently test data supported).
- Activate workflow for weekly automation.
What It Does
This workflow automates Android feature flag cleanup:
- Runs automatically every week.
- Connects to GitHub repository.
- Fetches all Android
.kt and .java files.
- Reads source code files.
- Detects possible feature flags inside code.
- Loads Firebase Remote Config flags.
- Compares code flags vs Firebase flags.
- Finds unused Firebase flags.
- Creates final summary report.
- Sends report to Slack.
This helps teams remove stale flags and maintain clean configuration.
Who It's For
This workflow is ideal for:
- Android development teams
- Tech leads
- QA teams
- DevOps / Release teams
- Firebase Remote Config users
- Teams maintaining multiple feature flags
Requirements to Use This Workflow
To run this workflow, you need:
- n8n account (cloud or self-hosted)
- GitHub repository access
- Slack workspace
- Firebase Remote Config project (optional initially)
- Basic understanding of Android source files
How It Works
- Weekly Trigger – Workflow starts automatically every week.
- Load Settings – Reads repository and workflow settings.
- Connect GitHub – Fetches project files.
- Filter Android Files – Only
.kt and .java files selected.
- Read Code – Downloads and decodes file content.
- Detect Flags – Finds feature flags from source code.
- Load Firebase Flags – Uses Firebase Remote Config flags.
- Compare Flags – Finds used and unused flags.
- Create Report – Builds totals and cleanup summary.
- Send Slack Alert – Posts report to team channel.
Setup Steps
- Import the workflow JSON into n8n.
- Open Workflow Settings node.
- Enter:
- GitHub Owner
- GitHub Repo
- Branch Name
- Connect GitHub credentials.
- Connect Slack credentials.
- Select Slack channel.
- Replace mock Firebase flags with real Firebase API later.
- Activate workflow.
How To Customize Nodes
Customize Scan Schedule
Change Cron node:
Customize File Types
Change file filter:
Customize Flag Detection
Improve regex to detect:
BuildConfig.FEATURE_*
RemoteConfig.getString()
- Custom wrappers
Customize Slack Alerts
You may add:
- Emojis
- Mentions
- Team tags
- Priority warnings
Add-Ons (Optional Enhancements)
You can extend this workflow to:
- Create Jira cleanup tickets
- Update Google Sheets catalog
- Create GitHub PR with markdown report
- Track first seen / last seen flags
- Team ownership by prefix
- Strict aging rules (30+ days unused)
- Multi-repository scanning
Use Case Examples
1. Firebase Cleanup
Remove old Remote Config flags not used in app code.
2. Weekly Engineering Report
Send flag health report to Slack.
3. Release Readiness
Check unused experiments before release.
4. Tech Debt Reduction
Keep feature flag system clean and manageable.
5. Multi-Team Visibility
Know which flags are active or stale.
Troubleshooting Guide
| Issue |
Possible Cause |
Solution |
| No files found |
Wrong repo/branch |
Check settings |
| Slack message failed |
Wrong credentials |
Reconnect Slack |
| No flags detected |
Regex too strict |
Improve detection logic |
| Too many files |
Large repo |
Reduce scan scope |
| Firebase data empty |
API not connected |
Use mock data or fix API |
| Workflow not running |
Disabled trigger |
Enable Cron node |
Need Help?
If you need help customizing this workflow by adding Jira, Google Sheets, GitHub PR creation, real Firebase API integration or scaling for enterprise use then our n8n workflow developers at WeblineIndia can help build an advanced production-ready version.