I’m using the iOS Shortcuts app (v2.0) and have encountered some issues importing shortcuts. I attempted to use a technique I used successfully with a general-purpose Backup & Restore workflow that I created using the Workflow app.
As described in the Apple Workflow documentation, the ‘import’ URL takes the form:
workflow://import-workflow?url=[url]&name=[name]&silent=true|false
Issue 1
It appears that the silent setting is always ignored; thus when a running shortcut executes the Open URL
action (for a workflow://import-workflow?=...
URL) the running shortcut exits and relinquishes control to the Shortcuts app. If the Library did not previously include a shortcut with the same name, the Shortcuts app immediately opens the newly imported shortcut. If the Library did previously include a shortcut with the same name, the Shortcuts app displays the following dialog: You already have a shortcut named “(shortcut_name)”. Would you like to replace your shortcut? Replace | Keep Both | Cancel.
Since silent is always ignored, my aforementioned workflow (that includes an Open URLs
action [workflow://import-workflow?url=[url]&name=[name]&silent=true
] in a repeat loop) always relinquishes control to the Shortcuts app, thereby cannot be used to import more than one shortcut. This is particularly disappointing since I have zip files that contain archived workflows, and I used my Backup & Restore workflow to manage them.
Issue 2
Regardless of the silent setting, the Open URLs
action (with a workflow://import-workflow?url=[url]&name=[name]
) only imports properly if the shortcut is started from the shortcut editor (by tapping on the right-pointing triangle at the top of the editor). If the shortcut is started from the Shortcuts Library (by tapping on the shortcut colored rounded-rectangle), Open URLs
does not initiate the shortcut import. Instead when the Open URLs
action runs, the Shortcuts app dims the Library display and overlays a single OK button. No other message is displayed, but the shortcut is not imported.
Note that I encountered the same behavior when I attempted all of the combinations of workflow/shortcut:
workflow://import-workflow?url=[url]&name=[name]
workflow://import-shortcut?url=[url]&name=[name]
shortcuts://import-workflow?url=[url]&name=[name]
shortcuts://import-shortcut?url=[url]&name=[name]
Note: I also submitted this information to Apple.
Reddit Cross-Post here.