Issue Importing Shortcuts via Import URL

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.

Yes, this is a pain.

I got a corrupted Shortcuts database a few days ago which prevented my shortcuts from showing on to the today widget. The prompt said to send it to support or reset my database – which will delete all my workflows. I didn’t want to send it to support since there were some sensitive information in some of the shortcuts.

Force closing the Shortcut app and reopening gets me access on my shortcuts but still not on the today widget.
Good news is, I managed to backup my shortcuts into the Files, copy them into the Scriptable folder, and build a script that loads the shortcut files and calls the Shortcut’s shortcuts://import-shortcut import them.

Yes, the silent parameter did not work but it continued to switch back and forth between Shortcuts and Scriptable without manual interaction.

1 Like

Any chance you can share that in the Scriptable category? I need to start over with my DB and importing hundreds of shortcuts manually was not something I was looking forward to!

2 Likes

I’ll clean it up then will share.

1 Like