fbpx

FREE! Plan Your Ideal Week: Bonus Workshop + Planner  →  Get the Workshop

Organizing Shortcuts Within Shortcuts to Reduce Duplication

Over the last few weeks, we’ve shared some shortcuts that use several actions together to make your life a little easier. The problem with Shortcuts is that you can end up repeating a lot of the smaller steps when creating new shortcuts. That’s why it’s important to understand how you can run shortcuts from within other shortcuts, which will save you time and minimize the introduction of new bugs or errors.

Embedding shortcuts is a fancy way of saying: “Use the Run Shortcut action inside a shortcut.” That’s right β€” you can run another shortcut from inside your shortcut, and the embedded shortcut will return the results into the main shortcut. Let’s take an example of compressing and saving images to an iCloud Drive location. There three main steps for this shortcut:

  1. Gather the input and start a repeat loop for each item.
  2. Compress the current repeat image to a smaller size.
  3. Save the compressed image to a predefined location, and restart the loop for any remaining items.

When it comes to compressing images or saving items to a specific location, you can probably think of at least a couple other shortcuts in your arsenal that already do this. Instead of building out the same steps in a new shortcut, you can split these small actions out into their own shortcut so that you can simply call that shortcut from wherever you want.

The embedded shortcut looks something like this:

  1. Gather the input and start a repeat loop for each item.
  2. Run a shortcut that compresses images to a smaller size.
  3. Run another shortcut that takes the previous result and saves it to a predefined location, then restart the loop for any remaining items.

If this sounds oddly familiar, then you’re not wrong. It’s not too far off from the idea of atomic notes for connected thoughts. If you can reduce something to it’s most atomic level, you can use it anywhere else β€” this applies to notes, shortcuts, and many other things in life.

Here’s a shortcut example that uses two smaller shortcuts to compress images and save them to an iCloud folder. The shortcut simply accepts any images as input and starts a repeat loop for each image.

image 1

Next, we call a shortcut that compresses the image to a smaller file size (and quality) and converts it to a .jpeg type.

image 2

Finally, we pass the result from the previous shortcut to another shortcut that saves the file to a predefined location in iCloud drive (a folder called temp inside the main Shortcuts folder).

image 3

The loop repeats until it’s gone through each item that you selected, and then it’s done!

As you peruse your Shortcuts collection and notice repetition, you can create your own embedded shortcuts so that you can use them in future shortcuts without needing to copy a bunch of steps. And, if you need to change or modify something in an embedded shortcut, you only have to do it once instead of repeating those changes in any other shortcuts that use the same steps.


We have more helpful tips right here.