I created a document/form/script. The script worked just fine in Tap Forms. Then I added the script to Siri. I created a Shortcut that used the action to execute the script in the form. However, it did NOT work; I got an error saying that the run was taking too long.
When I switched to using the x-callback (as suggested), everything was happy.
The document in question and a screenshot of the shortcut can be found in this thread
Some of the challenges of the Shortcuts interface is that if there is any error in your script, you not only don’t get to see it but also then you get the behaviour where Shortcuts times out because it is waiting for a response that it’ll never get. One of the other issues is that if you have anything that invokes a UI interaction then that will get blocked. And finally we found out late last year that along the way Apple is nuking the clipboard contents so if you’re relying upon that then you’d be out of luck.
This does mean that it’s limited in what capabilities it can do at the moment. I was thinking about it the other day and I think if it accepted a string and returned a string to Shortcuts then we’d be able to input data into the script and it can be as structured, or unstructured, as necessary for the script to handle.