This is more powerful than Mac’s own Automator tool, Lua is an interesting choice. Mac Automator used to only support AppleScript but now it supports JavaScriptCore from WebKit so you can run JavaScript with Mac Automator. This is what I do.
I’ll have a hell of a time rewriting everything into Lua when I have soooo many node packages I leverage.