Automation library · Alerts and monitoring

Sync Android env config to Gradle files with GitHub and Slack

Started by another system calling it, and works across GitHub and Slack. 28 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large

28 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Logic 16Service 11

The steps in the order they run, from what starts it.

  1. 1Receive GitHub WebhookWebhookStarts it
  2. 2Check if .env.staging ChangedCodeLogic
  3. 3Proceed Only if ENV ChangedIfLogic
  4. 4Fetch .env.staging from RepoGithubService
  5. 5Fetch gradle.properties from RepoGithubService
  6. 6Parse .env.staging into Key-ValueCodeLogic
  7. 7Parse gradle.properties into Key-ValueCodeLogic
  8. 8Combine Env & GradleMergeLogic
  9. 9Compare ENV and Gradle VariablesCodeLogic
  10. 10Generate New Branch NameCodeLogic
  11. 11Get Latest SHA of main BranchHttp RequestService
  12. 12Prepare SHA for Branch CreationSetLogic
  13. 13Create New Git BranchHttp RequestService
  14. 14Fetch .env.staging from New BranchGithubService
  15. 15Fetch build.gradle FileGithubService
  16. 16Fetch gradle.properties FileGithubService
  17. 17Decode .env.stagingCodeLogic
  18. 18Decode build.gradleCodeLogic
  19. 19Decode gradle.propertiesCodeLogic
  20. 20Combine Decoded Files for DiffMergeLogic
  21. 21Identify Config ChangesCodeLogic
  22. 22Apply ENV Changes to build.gradleCodeLogic
  23. 23Apply ENV Changes to gradle.propertiesCodeLogic
  24. 24Commit build.gradle Updates to BranchGithubService
  25. 25Commit gradle.properties Updates to BranchGithubService
  26. 26Prepare Pull Request DataSetLogic
  27. 27Create Pull RequestHttp RequestService
  28. 28Notify Team on SlackSlackService

How it's built

Starts on
Another system calling it
Steps
28, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
GitHub, Slack
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own GitHub and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 28 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 28 steps before you point it at anything that matters.