Yes that works. In your script make sure to enabled UUI in script properties. I created a custom action that did a UUI.Update with Script.Agent Name, then a blind transfer to a queue. The name will be available in the built-in variable Call.UUIData in the flow.
------------------------------
Melissa Bailey
Genesys - Employees
------------------------------