Preferences
VARIABLES
Set variable
argv
to
Input
COMMENT
Store and retrieve preferences. Use it to store API keys, settings, and content that you want to share between shortcuts.
Demo:
https://www.icloud.com/shortcuts/cf74fba5a4664fcb836adb1ee9d88ad7
DICTIONARY

Dictionary
COMMENT
Load /Shortcuts/Settings.json file
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
VARIABLES
Set variable
Settings
to
Input
SCRIPTING
Count
Characters
in
Input

Count
SCRIPTING
If
Input
Condition
COMMENT
If does not exist, create the Settings file
TEXT
{}

Text
SCRIPTING
Set name of
Input
to
Filename

Renamed Item
DOCUMENTS
Save
File
Destination Path
/Shortcuts/TextOverwrite If File Exists

Saved File
VARIABLES
Set variable
Settings
to
Input
SCRIPTING
End If

If Result
COMMENT
Perform the requested actions. Default to show all if nothing is passed
DICTIONARY

Dictionary
VARIABLES
Add
Input
to
argv
SCRIPTING
Get
First Item
from
List

Item from List
VARIABLES
Set variable
argv
to
Input
VARIABLES
Get
argv
SCRIPTING
Get dictionary from
Input

Dictionary
VARIABLES
Set variable
req
to
Input
SCRIPTING
Get
All Keys
in
Dictionary

Dictionary Value
VARIABLES
Set variable
actions
to
Input
SCRIPTING
If
Input
Condition
VARIABLES
Get
Settings
SCRIPTING
Set
req
to
req
in
Dictionary

Dictionary
VARIABLES
Set variable
Settings
to
Input
SCRIPTING
Set name of
Input
to
Filename

Renamed Item
DOCUMENTS
Save
File
Destination Path
/Shortcuts/TextOverwrite If File Exists

Saved File
SCRIPTING
Get
Value
for
req
in
Dictionary

Dictionary Value
VARIABLES
Set variable
ret_val
to
Input
SCRIPTING
End If

If Result
VARIABLES
Get
actions
SCRIPTING
If
Input
Condition
VARIABLES
Get
Settings
VARIABLES
Set variable
ret_val
to
Input
SCRIPTING
End If

If Result
VARIABLES
Get
actions
SCRIPTING
If
Input
Condition
VARIABLES
Get
Settings
SCRIPTING
Get
Value
for
req
in
Dictionary

Dictionary Value
VARIABLES
Set variable
ret_val
to
Input
SCRIPTING
End If

If Result
VARIABLES
Get
ret_val
Showcuts