⚙️ Detect unused Android feature flags with GitLab, LaunchDarkly, Jira & Slack

114 views · ⚙️ DevOps & CI/CD

Description

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

How it works

  1. Weekly Trigger runs the process.
  2. GitLab Node fetches repository code.
  3. Regex Extraction finds all feature flags in code.
  4. LaunchDarkly API retrieves all configured flags.
  5. Comparison Logic marks flags as “dead” if unused in code and archived or off in production.
  6. Google Sheets stores flagged results.
  7. Jira creates a ticket for each dead flag.
  8. Slack notifies the team.

How to set up

  1. Import JSON into n8n.

  2. Connect credentials for:

    • GitLab OAuth2
    • Google Sheets
    • Jira
    • Slack webhook URL
  3. 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.
  4. Activate workflow.

Requirements

How to customize

Add-ons

Use Case Examples

Common troubleshooting

IssuePossible CauseSolution
Workflow fails at GitLab nodeInvalid repo path or missing OAuth scopeUpdate repo path & check GitLab OAuth permissions
LaunchDarkly API request returns 401Invalid or expired API keyGenerate a new API key in LaunchDarkly & update node
Google Sheets node failsWrong Sheet ID or missing sharing permissionsConfirm Sheet ID and share with connected Google account
Jira ticket not createdMissing required fieldsSet project key, issue type, and summary in Jira node
Slack alert not sentWebhook URL invalid or revokedRegenerate 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.

🔗 Nodes Used

Google Sheets, HTTP Request, Slack, GitLab, Jira Software, Schedule Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup