A bit late. I’ll mention just one way, which is perhaps not ideal for every situation, but its succinct. Bubble has a server-side function called get_object_from_id( ) and get_objects_from_ids( ), which will take a 32-digit UID (or array of UIDs) and return JS object(s).
If you check out the post below, you can see that mishav’s toolbox plugin has some documentation and an example app where this is done and then returns JSON. You could also use a plugin that converts things to JSON and one workflow step and then convert the JSON to an object in your plugin/script