Revolutionizing Shortcuts: a Game-Changing Method for Copy/Paste Actions

Revolutionizing Shortcuts: a Game-Changing Method for Copy/Paste Actions

The Apple Shortcuts community never fails to impress, and this time an extremely important discovery has been made by @dotdev (on Routinehub and Discord), which could change the rules of the game. In simple terms, they have managed to find a method to create shortcut actions that can paste actions directly into any shortcut without the need to signing. Rather than an article, this will be a collection of quotes, so as not to detract from the credit due to the protagonists of this story.

It all started with a question from the user @spenpal on Discord, with the following query:

Is it possible to make a shortcut that copies a shortcut action to your clipboard? For example, I would like to automatically copy a Dictionary action that has a predefined key and value. I could just make a shortcut with the a Dictionary action and manually copy it, but I’d like to add variations, which will get tedious to manually copy everytime. So, it would be nice with a press of a shortcut, it automatically copies to my clipboard.

To which @dotdev responded with evidence of the functionality of their method:

According to @dotdev, this is how it works:

Basically when you copy an action manually then set clipboard to .plist it will show the underlying structure that makes up the action that got copied to the clipboard the reason the shortcuts app is able to understand what the plist data is meant to represent is via the uniform type identifier (UTI) which is what apple uses besides file extensions to understand how to work with certain files. In this case when you copy an action to the clipboard the shortcuts app gives it a UTI of com.apple.shortcuts.action so when you paste it into shortcuts it understands that the plist data is a shortcuts action
That since there's no way of natively setting or checking the UTI of a file you need to get the actions app which provides the actions to do so.
Once you have the plist of the shortcut dictionary action, you can just paste it as text and use it instead of getting clipboard.

For an easier understanding, @mvan231 (ShortCasts) (on Routinehub and discord ) took the time to elaborate on the steps to follow in a simple and organized way:

  • In source shortcut surround actions you want in repeat 1 time action
  • Go to destination shortcut
  • Hit the share button in the shortcut editor of the destination shortcut and run Shortcut Source Tool from the share sheet (the passed iCloud link isn't actually doing anything)
  • Select the source shortcut that you added the repeat 1 time action(s) in
  • Select the menu option to copy actions to clipboard
  • Shortcut finishes and now you can paste at your desired location within the shortcut you're already in

Without a doubt, my mind was blown when I learned about this method from @mvan231 and the post by @gluebyte on Automators.

Certainly, all of this is revolutionary and lays the groundwork for finding new methods to create shortcuts from other languages and then convert them into workflows. I'm eager to make the most of it and see what else the Apple Shortcuts community can achieve.