Open a file using its path

I want to open a file with the Open File action using the file’s path. This doesn’t work because the shortcut sees the path as text not a file. How can I convert a path to a file object that the Open File action will open?

A workaround which does work is to use the shell, but I’d rather use the approach explained above.

Another solution is to specify the files in the shortcut, or to get them with a dialog, but this is not a solution because I am storing the file paths in a text file.

I guess what I’m looking for is the Shortcut app’s equivalent to AppleScript’s POSIX File class. Thanks!