It’s not a typical use case, but probably 50% of use cases on Flow are custom in some way. That’s why Flow exists.
This is still your error?
"Got error updating metafield: “Value must be a file reference string.”
I just tested this in my store and was able to update a product metafield with a file reference type using an image from that Content section (with the gid string). Therefore, I suspect that your metafield is not set up to accept images. I see that by default it accepts “GenericFile” or something like that.
Here are my settings
