It would be nice if the actions you can set for an event from the default list also had a Flow Logic system, so that you could say on an event, perform this action if such and such is true (if/then/else/elseif) or on an event, based on such and such do one of these actions (switch/case). Probably not looping though. And in the case of custom JS action, make it so the code can just "return" a value that could be used.