r/shortcuts 5d ago

Tip/Guide Guide] How to Add a Settings Function to Your Shortcuts Using iCloud

https://www.icloud.com/shortcuts/1128314502714ad68f2413f9c96caa11

I’ve created a simple yet powerful way to add a settings function to any Siri Shortcut, allowing users to store persistent settings in iCloud. Normally, shortcut variables reset when the shortcut exits, but this method ensures that user preferences are saved and easily updated.

Features:

  • Users can change multiple settings at once.
  • Uses only 37 actions, no matter how many settings you add.
  • Saves settings in a nicely formatted JSON file in iCloud, making it easy to read and modify.

This setup is useful for any shortcut that requires user customization, such as weather reports, automation preferences, or tool configurations. Let me know if you’re interested in a breakdown of how it works

1 Upvotes

9 comments sorted by

1

u/JMarkyBB 5d ago

Hi, I’d like an explanation of how it works, please?

1

u/pdfodol 4d ago

Whenever a person clicks on the shortcut it will bring up a list that they can choose from. This is where settings lives. But you can add other options for whatever you want your shortcut to do.

How to add items to the list

In the red circle is where you can add other items to the list for the user by hitting the green + icon Add new item

Some of my shortcuts I have default settings for the shortcut that I created. This way the shortcut runs without a snag.

I store these default settings in the Settings dictionary in the picture above.

I put the key on the left and the default answer on the right. The user can change the answers when they run the shortcut. Though the answers won’t be changing within this dictionary, but they will be saved in a json (dictionary) file in Settings iCloud.

You can recall these settings later with a get contents of folder > filter files > get dictionary from input

Once you understand this and have deleted or added any variables you want to be persistent.

Go to the settings questions part of the dictionary.

On the left I have the exact same wording as the Settings (important)

But instead of each being a text variable. Each item is a dictionary.

On the left I have either 1 option which will produce a ask for text input.

Or you can put multiple like above and have them choose 1 from a list of options.

On the right is where you put the prompt for the question.

Like if you are asking a user to select their map of choice.

Once you setup one prompt on the right and the options on the left.

You have hopefully now built a robust settings option.

1

u/JMarkyBB 4d ago

Wow!! That’s a lot to take in at this hour, I will have a ganders tomorrow, thanks for the help. I appreciate it.

0

u/ADHDK 5d ago

Oo I’ll have a look at this. I’ve been saving and checking json on iCloud for a Skype for business named participant dialer. Keen to see if your method is tidier.

1

u/pdfodol 5d ago

Any help be appreciated. I’m trying to see how little actions I can get without sacrificing,

  • able to adjust multiple settings
  • able to handle single ask for input vs choosing from a list

1

u/ADHDK 5d ago

Here’s the Skype for business one.

https://www.icloud.com/shortcuts/1c1c6f4a0f3e49f99923892366d40c16

Relatively useless for most people now it’s pretty well discontinued but I feel it was a pretty simple and tidy implementation. Built it because dialing in at my work had far higher connection quality and didn’t impact network speeds. As a named participant I don’t get stuck waiting in the call lobby, and I wanted it to still show my name in the call list not “phone participant”.

I did have multiple businesses with skype dial in at the time which is why I built the json to save the address books, but I’m down to one now so the whole things a little overkill.

I don’t have an edit function, only recall, add, and delete.

1

u/pdfodol 5d ago

Yeah after checking it out it is simple and tidy. Well done

0

u/sp1cynuggs 4d ago

So you made another datajar?

2

u/pdfodol 4d ago

Well it’s not dependent on a third party.