Do remember to post links wherever possible, and to place code in code blocks.
Here’s a test shortcut I created. It passes in two URLs to the Scriptable script. One defined as a Shortcuts URL, and one defined directly in plain text.
I named my Scriptable script
URL Arg Test.
let al = new Alert();
al.message = "Received " + args.urls.length + " URLs\n" + args.urls.join("\n") + "--- end ---";
Note that I’m treating
args.urls as an array, not a single element variable.
When I run it I get the following:
This indicates that two URLs were indeed received, but Scriptable has not picked up the values of those URLs.
If I set the Scriptable script to be visible for sharing URLs to, and then share from a web page however, the URL value that is passed in is picked up. It is exactly the same as the second URL passed from the Shortcuts test.
I think this tells us that Scriptable is receiving the data into the script in both cases (ref. the count of URLs), but while from the share sheet the values are accessible, when received from the Shortcuts action step, they are not.
@simonbs - is this an issue you are aware of?
- Scriptable Version: 1.6.3 (177)
- iPadOS Version: 14.4