I’ve been diving into building automations that need custom JS logic, and I keep running into the same issue: balancing the visual builder’s simplicity with the need to drop in actual code when things get complex. The graphical approach is great for the straightforward stuff—data flows, triggers, basic transformations—but once you need to manipulate arrays or handle edge cases, you’re either fighting the limited built-in tools or writing brittle scripts that break when you change something else.
Right now I’m experimenting with keeping the custom code nodes as minimal and focused as possible. Instead of dumping all the logic into one massive JS block, I’m trying to use smaller, purpose-built functions that do one thing. It feels less chaotic that way, and when something does break, it’s easier to pinpoint.
But here’s what I’m curious about: how do you all actually approach this? Do you try to keep JS to an absolute minimum and chain together more visual nodes instead? Or do you embrace the code and accept that some flows are just going to be mostly custom logic wrapped in a few visual connectors? And more importantly, how do you maintain these workflows over time without them becoming unmaintainable spaghetti?