I'm trying to run Shortcuts programmatically on Monterey. My understanding is that the official API for this is via AppleScript to the Shortcuts Events process.
I created a Shortcut that does Quicklook on the passed in file parameter. It works as a Finder action but I can't figure out how to get it to work when running it via AppleScript or Scripting Bridge.
If I send a file, alias or POSIX file, I get a generic Shortcuts error 4. If I send a path as a string, it just does a preview of the string passed in, and not the contents of the file the path references.
Anyone have any insight on how to get this working?