To get a file from the output of a shell script you can use the "get file from folder" action.
This action in many cases cannot follow the path through an overlay of an APFS Volume Group. To avoid it you can choose the starting folder inside your home directory or in an ungrouped volume. Then use a relative path from it.
To get the relative path use the "replace text" action to remove the starting folder from the beginning of the string. Also remove the trailing new line.
/Volumes/ungrouped/|\n

To repeat with each file use the "split text" action. It also removes the trailing new line. 