Cocktails and Coffee Logo |||
Clean Up Your Shortcuts Library Banner Image

Clean Up Your Shortcuts Library

I have a lot of Shortcuts. Like hundreds. And most of them are old, outdated, broken, or designed around apps I no longer use. I needed a way to structure a cleanup of my Library, but I wasn’t sure how to do it. By folder? Maybe. But some folders have five Shortcuts and some have a hundred. So, I decided to make a Shortcut to plan my Shortcuts cleanup.1

To consider a Shortcut reviewed, I had 4 simple criteria…

  1. Does it work? Are there deprecated actions, blocks from uninstalled apps, etc. If it’s broken, is it worth updating? If so, update it. If not, delete it.
  2. Is it still useful? I’ve been using Shortcuts since it was Workflow, so I have some pretty old stuff in here. Do I still need this?
  3. Is it in the right place? My goal is to have zero Shortcuts in the root. Everything should live in a folder.
  4. Is it properly named? I’ve gone through lots of naming conventions over the years. Time to modernize and consolidate.

If the Shortcut makes the cut, great. If not, it gets deleted. Before I started this process, I made a backup of my Shortcuts just in case.

The Shortcut

Step Image Description
1 Find Omnifocus ProjectsFind Omnifocus Projects Step 1: Find Omnifocus Projects where the title matches the title of my Shortcuts Cleanup project. Create this project before running the Shortcut.
2 Ask for InputAsk for Input Step 2: Ask for Number determines how big you want your batches to be. I chose 15 at a time.
3 Ask for InputAsk for Input Step 3: Ask for Date determines when you want to start editing your first batch. I picked the next Saturday.
4 Adjust DateAdjust Date Step 4: Adjust Date to subtract a week. I do this to make the Repeat loop easier. 2
5 Set VariableSet Variable Step 5: Set Variable to dueDateZero. Not necessary, but easier to find defined variables than it is to find Smart Variables in longer Shortcuts.
6 Adjust DateAdjust Date Step 6: Adjust Date to subtract a day from dueDateZero. This will become the defer date.
7 Set VariableSet Variable Step 7: Set Variable for deferDateZero.
8 Get ShortcutsGet Shortcuts Step 8: Get Shortcuts to get all shortcuts.
9 Count ItemsCount Items Step 9: Count your Shortcuts (I had a lot)
10 CalculateCalculate Step 10: Calculate the number of Shortcuts divided by the size of the batch you chose in step 2.
11 Round NumberRound Number Step 11: Round the result. Make sure to round down so you don’t end up with a remainder.3
12 Set VariableSet Variable Step 12: Set Variable to the rounded number. This will be used as the repeat loop count.
13 TextText Step 13: Text with the Shourcuts pulled in step 8. This turns your Shortcuts into a simple text list by title. Set the My Shortcuts token to type=text.
14 Split TextSplit Text Step 14: Split Text by new lines. This will create one thing” per line.
15 RepeatRepeat Step 15: Repeat opens the repeat loop, and the variable tells it how many times to loop.
16 Adjust DateAdjust Date Step 16: Adjust Date adds the repeat index (the number of times the loop has run) number of weeks to the dueDateZero variable.
17 Adjust DateAdjust Date Step 17: Adjust Date again to iterate over the Defer Date
18 CalculateCalculate Step 18: Calculate the repeat inex times the batch size. This becomes the start number for step 20. First loop will be 15, second is 30, etc. (if you chose 15 as the batchSize in step 2)
19 CalculateCalculate Step 19: Calculate the startSize plus the batchSize. This gives you the end number for step 20.
20 Get ItemsGet Items Step 20: Get Items in Range of the start number (step 18) and the end (step 19) of the things” in the Split Text (step 14). Loop 1 gets 1-15, loop 2 gets 16-30, etc.
21 Repeat With EachRepeat With Each Step 21: Repeat With Each of the items from step 20.
22 TextText Step 22: Text containing the repeat item (the Shortcuts title) and some TaskPaper syntax.
23 End RepeatEnd Repeat Step 23: End Repeat will store every line created in step 22 as another list of text.
24 TextText Step 24: Text containing more Taskpaper formatted text. Adding the Repeat Index lets me see text like Shortcuts Cleanup Batch 1”, Shortcuts Cleanup Batch 2” etc. along with due and defer dates, then the repeat results from step 23. This will format the entry as a task with a due date (the first bit) with a bunch of subtasks (the repeat results bit)
25 Add Omnifocus TaskpaperAdd Omnifocus Taskpaper Step 25: Add Taskpaper will take the text in step 24 and add it to the project you found in step 1.

Running this Shortcut will give you a bunch of tasks in Omnifocus named Shortcuts Cleanup Batch {some mumber}” with 15 subtasks, each with a title of a Shortcut. It will set a defer and due date on each main task, and the @autodone(true) flag in the Taskpaper will set the main task to be completed when all the subtasks are done. Now, I just go through this list every weekend and knock out 15 Shortcuts. I’m 2 weeks in so far, and it’s going well. I’ve gotten rid of about 15 Shortcuts already. According to my Omnifocus project, I have 442 to go, and will be done in early September. 🙃

Screenshot of the Shortcuts Cleanup Omnifocus ProjectScreenshot of the Shortcuts Cleanup Omnifocus Project

You can get the Shortcut here

Comment or reply on Mastodon

  1. Because when everythings a nail, Shortcuts is the hammer. 🔨 Or something like that…↩︎

  2. By subtracting one thing” from the first iteration, you can just add the repeat index to the loop everytime with no extra logic. If day zero” is minus one week, then repeat index 1 will add a week, making the first iteration the requested date.↩︎

  3. Yes, this will give you some number of Shortcuts that are not included, but that number should be small and easily managed at the end.↩︎

🗓️ March 1, 2023 🏷️ Omnifocus 🏷️ Shortcuts 🏷️ Automation
CC BY-NC-SA 4.0 © 2007-2023 Jimmy Little Support me on Ko-fi