Detect Unused Android Feature Flags with GitLab, LaunchDarkly, Jira & Slack
Android Feature Flag Cleanup Bot (GitLab + LaunchDarkly)
This n8n automation detects unused (“dead”) feature flags in an Android Kotlin/Java codebase by comparing your GitLab repository code against LaunchDarkly’s feature flag list.
It logs results in Google Sheets, creates Jira tickets for cleanup and sends Slack alerts automatically.
Who’s it for Android engineering teams using Kotlin/Java. Teams managing feature flags in LaunchDarkly. DevOps/QA teams wanting to reduce technical debt from stale flags.
How it works
Weekly Trigger runs the process. GitLab Node fetches repository code. Regex Extraction finds all feature flags in code. LaunchDarkly API retrieves all configured flags. Comparison Logic marks flags as “dead” if unused in code and archived or off in production. Google Sheets stores flagged results. Jira creates a ticket for each dead flag. Slack notifies the team.
How to set up
Import JSON into n8n. Connect credentials for:
GitLab OAuth2
Google Sheets
Jira
Slack webhook URL
Update: GitLab repo details in the GitLab node. LaunchDarkly API key in HTTP Request node. Google Sheet ID in Google Sheets node. Jira project & issue type in Jira node. Slack message formatting in Slack node. Activate workflow.
Requirements
n8n** (self-hosted or cloud) GitLab repository with Kotlin/Java code LaunchDarkly account + API token Google Sheets API access Jira API access Slack incoming webhook
How to customize
Change regex pattern in “Detect flags” node if your flag naming convention differs. Adjust dead flag logic in “Find dead flags” node (e.g., treat test env separately). Modify Slack message to include more details (e.g., description from LaunchDarkly). Add email notifications for broader distribution.
Add-ons
Email Alerts** via Gmail/SMTP. GitHub / GitLab MR** to remove dead flags automatically. Confluence Integration** to document flag cleanup history.
Use Case Examples
Weekly automated cleanup alerts for large engineering teams. Maintaining clean feature flag lists in high-traffic apps. Compliance-driven projects requiring flag lifecycle tracking.
Common troubleshooting
| Issue | Possible Cause | Solution | | ------------------------------------ | --------------------------------------------- | -------------------------------------------------------- | | Workflow fails at GitLab node | Invalid repo path or missing OAuth scope | Update repo path & check GitLab OAuth permissions | | LaunchDarkly API request returns 401 | Invalid or expired API key | Generate a new API key in LaunchDarkly & update node | | Google Sheets node fails | Wrong Sheet ID or missing sharing permissions | Confirm Sheet ID and share with connected Google account | | Jira ticket not created | Missing required fields | Set project key, issue type, and summary in Jira node | | Slack alert not sent | Webhook URL invalid or revoked | Regenerate Slack webhook and update in node |
Need Help?
If you’d like, we can help set up and customize this workflow for your exact repo, flag rules and team notification preferences — including regex adjustments, extra reporting or adding automatic cleanup PRs.
Contact our n8n automation team at WeblineIndia.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments