I cannot figure how to pass any variable into a script.
And not a single KMVAR to be seen
My guess is that you don't have "Include all variables" checked.... (because when I typed your code, I got a test variable visible.
I copy pasted this from another workflow and this was indeed the problem. Thanks a bunch!
Yup. Many actions (most actions) have hidden fields that contain data (mostly in the cogwheel, but that's not the only place.) If you copy an action, you risk copying those hidden data fields.