Last shortcut i run

Okay. Here is the process I could think of that might work for you. Unfortunately, it does mean you have to save the Shortcut name to a file in every shortcut you have. I made two shortcuts that you can use to save the name of a shortcut, and one to get the name of the last one you saved.

Basically, what you’ll do is pass the name of the shortcut to the first “function”

Then, you can continue with the rest of the shortcut (or, you can put this at the end of the shortcut, just make sure the “function” shortcut gets ran).

When you want to get the last shortcut, run the “function” shortcut to simply read that file

Once you have that, you can use the Run Shortcut By Name shortcut from above (which I’ve also turned into a “function”

Func SaveShortcutName()
https://www.icloud.com/shortcuts/6453986afde44203ad30879d3c7c5f0d

Func GetLastShortcutName()
https://www.icloud.com/shortcuts/87cd7c32ea954b0db0ce596afe100bef

Func RunShortcutByName()
https://www.icloud.com/shortcuts/66ffd86efbb4489d842df15399de5b51

A note about why I named these shortcuts the way I did: I name modular shortcuts that accept input and give me an output that I can later use. I name these all with the prefix of “Func” (because they’re basically functions) and give them all the cube icon with a gray background. The parentheses are just for fun. This way, they all look the same and are all sorted the same when I search for them.

Hope this helps.

1 Like