@vitor,
Suddenly having some trouble with the Shortcuts workflow; apologies in advance if this gets chalked up to user error. Possibly this is a problem with the Run Shortcuts object, but I figured you’d be able to gauge either way.
Basically, I’m able to pass a string to the Shortcuts workflow via Universal Action and Run Shortcut on it, but not a file/folder.
I’ve made test shortcuts that receive all types of input and then return a notification. These shortcuts will receive an string argument from Alfred and then correctly return that argument as a notification. If I pass in a file as a string (“Treat Input as String”) in the Run Shortcuts object, the notification returns that file path as a string. But, if I choose “Treat Input as File(s),” the notification is blank and shortcut steps like “Reveal File” don’t take any action, and Quick Look reports nothing was passed via Shortcut Input.
I put in a couple of Debugs into your Shortcuts workflow, and it looks like the workflow is passing the right information to the Run Shortcuts object — the JSON Config object is passing an “inputmode” of 1 for files and 0 for strings, etc. That’s why I’m wondering if it’s something in the Run Shortcuts object itself; the correct data is being passed to the Run Shortcuts object, but irrespective if Run Shortcut is directly configured or configured via JSON Config, it still doesn’t seem to function on file arguments.
I have tried regressing my version of the Shortcuts workflow, but that didn’t help. I don’t believe I can download an earlier version of Alfred (back to v5.06), but that would be the next thing I’d try with the newest version of the Shortcuts workflow, again to see if the newest iteration of the Run Shortcuts object in Alfred is causing the issue.
I appreciate any insight you can provide. Thanks!
P.S. Workaround that does seem to work is getting a file/folder via Universal Action, and then passing that argument to a Run Script object, /bin/zsh, that runs `shortcuts run SHORTCUT_NAME -i $query`, the command line version of Shortcuts. I don't think that illuminates anything necessarily, except that Shortcuts can indeed take an Alfred argument and run with it, just seemingly not through the Run Shortcuts object.