This is a list of all actions supported by python-shortcuts.
Legend:
- keyword: This keyword you can use in
toml
files to describe action - shortcuts identifier: (itype) this identifier will be used to generate an action in a shortcut
System variables:
{{ask_when_run}}
- ask the user for an input when the shortcut is running.
Show alert
keyword: alert
shortcuts identifier: is.workflow.actions.alert
params:
- show_cancel_button (required, default=True)
- text (required, variables support)
- title (required, variables support)
Append file
keyword: append_file
shortcuts identifier: is.workflow.actions.file.append
params:
- path (required, variables support)
Append input to varaible
keyword: append_variable
shortcuts identifier: is.workflow.actions.appendvariable
params:
- name (required)
Ask for input
keyword: ask
shortcuts identifier: is.workflow.actions.ask
params:
- default_answer (variables support)
- input_type ()
- question (required)
Base64 decode
keyword: base64_decode
shortcuts identifier: is.workflow.actions.base64encode
Base64 encode
keyword: base64_encode
shortcuts identifier: is.workflow.actions.base64encode
Change case
keyword: change_case
shortcuts identifier: is.workflow.actions.text.changecase
params:
-
case_type (required) | choices:
-
UPPERCASE
-
lowercase
-
Capitalize Every Word
-
Capitalize with Title Case
-
Capitalize with sentence case.
-
cApItAlIzE wItH aLtErNaTiNg CaSe.
-
Comment: just a comment
keyword: comment
shortcuts identifier: is.workflow.actions.comment
params:
- text (required)
Continue in shortcut app
keyword: continue_in_shortcut_app
shortcuts identifier: is.workflow.actions.handoff
Image convert
keyword: convert_image
shortcuts identifier: is.workflow.actions.image.convert
params:
- compression_quality (required)
- format (required)
- preserve_metadata (required)
Count
keyword: count
shortcuts identifier: is.workflow.actions.count
params:
- count (required)
Create folder
keyword: create_folder
shortcuts identifier: is.workflow.actions.file.createfolder
params:
- path (required, variables support)
Date
keyword: date
shortcuts identifier: is.workflow.actions.date
params:
- default_answer (variables support)
Delay
keyword: delay
shortcuts identifier: is.workflow.actions.delay
params:
- time (required)
Detect date
keyword: detect_date
shortcuts identifier: is.workflow.actions.detect.date
Detect Language with Microsoft
keyword: detect_language
shortcuts identifier: is.workflow.actions.detectlanguage
Dictionary
keyword: dictionary
shortcuts identifier: is.workflow.actions.dictionary
params:
- items (required, variables support)
Else
keyword: else
shortcuts identifier: is.workflow.actions.conditional
params:
- group_id ()
End menu
keyword: end_menu
shortcuts identifier: is.workflow.actions.choosefrommenu
params:
- group_id ()
EndIf: end a condition
keyword: endif
shortcuts identifier: is.workflow.actions.conditional
params:
- group_id ()
Exit
keyword: exit
shortcuts identifier: is.workflow.actions.exit
Expand URL: This action expands and cleans up URLs that have been shortened by a URL shortening service like TinyURL or bit.ly
keyword: expand_url
shortcuts identifier: is.workflow.actions.url.expand
Format date
keyword: format_date
shortcuts identifier: is.workflow.actions.format.date
params:
- format (required)
Get battery level
keyword: get_battery_level
shortcuts identifier: is.workflow.actions.getbatterylevel
keyword: get_clipboard
shortcuts identifier: is.workflow.actions.getclipboard
Get device details
keyword: get_device_details
shortcuts identifier: is.workflow.actions.getdevicedetails
params:
-
detail (required) | choices:
-
Device Name
-
Device Model
-
System Version
-
Screen Width
-
Screen Height
-
Current Volume
-
Current Brightness
-
Get dictionary from input
keyword: get_dictionary
shortcuts identifier: is.workflow.actions.detect.dictionary
Get current IP address
keyword: get_ip_address
shortcuts identifier: is.workflow.actions.getipaddress
params:
-
address_type (required) | choices:
-
IPv4
-
IPv6
-
-
source (required) | choices:
-
Local
-
Global
-
Get latest photos
keyword: get_last_photo
shortcuts identifier: is.workflow.actions.getlastphoto
Get my shortcuts
keyword: get_my_shortcuts
shortcuts identifier: is.workflow.actions.getmyworkflows
Get name of emoji
keyword: get_name_of_emoji
shortcuts identifier: is.workflow.actions.getnameofemoji
Get text from input
Returns text from the previous action's input. For example, this action can get the name of a photo or song, or the text of a web page.
keyword: get_text_from_input
shortcuts identifier: is.workflow.actions.detect.text
Get time difference between dates
keyword: get_time_between_dates
shortcuts identifier: is.workflow.actions.gettimebetweendates
params:
-
custom_date ()
-
units (required, default=Total Time) | choices:
-
Total Time
-
Seconds
-
Minutes
-
Hours
-
Days
-
Weeks
-
Years
-
Other
-
Get URL
keyword: get_url
shortcuts identifier: is.workflow.actions.downloadurl
params:
- advanced ()
- form (variables support)
- headers (variables support)
- json (variables support)
- method ()
Get dictionary value
keyword: get_value_for_key
shortcuts identifier: is.workflow.actions.getvalueforkey
params:
- key (required, variables support)
Get variable: returns variable with name=name
in the output
keyword: get_variable
shortcuts identifier: is.workflow.actions.getvariable
params:
- name (required)
Hash action
keyword: hash
shortcuts identifier: is.workflow.actions.hash
params:
-
hash_type (required, default=MD5) | choices:
-
MD5
-
SHA1
-
SHA256
-
SHA512
-
If
keyword: if
shortcuts identifier: is.workflow.actions.conditional
params:
-
compare_with (required, variables support)
-
condition (required, default=Equals) | choices:
-
Equals
-
Contains
-
-
group_id ()
Menu item
You must specify the title for the item. After this action write all actions which you want to be executed when a user selects this option in the menu.
keyword: menu_item
shortcuts identifier: is.workflow.actions.choosefrommenu
params:
- group_id ()
- title (required)
Nothing
keyword: nothing
shortcuts identifier: is.workflow.actions.nothing
Show notification
keyword: notification
shortcuts identifier: is.workflow.actions.notification
params:
- play_sound (required, default=True)
- text (required, variables support)
- title (required, variables support)
keyword: number
shortcuts identifier: is.workflow.actions.number
params:
- number (required)
Opens the specified app.
keyword: open_app
shortcuts identifier: is.workflow.actions.openapp
params:
- app (required)
Open URL from previous action
keyword: open_url
shortcuts identifier: is.workflow.actions.openurl
Preview document
keyword: preview
shortcuts identifier: is.workflow.actions.previewdocument
Get file
keyword: read_file
shortcuts identifier: is.workflow.actions.documentpicker.open
params:
- not_found_error (required)
- path (required, variables support)
- show_picker (required)
Repeat
keyword: repeat_end
shortcuts identifier: is.workflow.actions.repeat.count
params:
- group_id ()
Repeat
keyword: repeat_start
shortcuts identifier: is.workflow.actions.repeat.count
params:
- count (required)
- group_id ()
Repeat with each end
keyword: repeat_with_each_end
shortcuts identifier: is.workflow.actions.repeat.each
params:
- group_id ()
Repeat with each start
keyword: repeat_with_each_start
shortcuts identifier: is.workflow.actions.repeat.each
params:
- group_id ()
Run shortcut
keyword: run_shortcut
shortcuts identifier: is.workflow.actions.runworkflow
params:
- shortcut_name (required)
- show (required)
Save file
keyword: save_file
shortcuts identifier: is.workflow.actions.documentpicker.save
params:
- overwrite (required)
- path (required, variables support)
- show_picker (required)
Scan QR/Barcode
keyword: scan_barcode
shortcuts identifier: is.workflow.actions.scanbarcode
Select photos
keyword: select_photo
shortcuts identifier: is.workflow.actions.selectphoto
Send Message
keyword: send_message
shortcuts identifier: is.workflow.actions.sendmessage
params:
- recepients (required, variables support)
- text (required, variables support)
Set airplane mode
keyword: set_airplane_mode
shortcuts identifier: is.workflow.actions.airplanemode.set
params:
- on (required)
Set bluetooth
keyword: set_bluetooth
shortcuts identifier: is.workflow.actions.bluetooth.set
params:
- on (required)
Set brightness
keyword: set_brightness
shortcuts identifier: is.workflow.actions.setbrightness
params:
- level (required)
keyword: set_clipboard
shortcuts identifier: is.workflow.actions.setclipboard
params:
- expiration_date ()
- local_only ()
Set Do Not Disturb
keyword: set_do_not_disturb
shortcuts identifier: is.workflow.actions.dnd.set
params:
- enabled (required)
Set item name
keyword: set_item_name
shortcuts identifier: is.workflow.actions.setitemname
Set Low Power mode
keyword: set_low_power_mode
shortcuts identifier: is.workflow.actions.lowpowermode.set
params:
- on (required, default=True)
Set mobile data
keyword: set_mobile_data
shortcuts identifier: is.workflow.actions.cellulardata.set
params:
- on (required)
Set Torch
keyword: set_torch
shortcuts identifier: is.workflow.actions.flashlight
params:
-
mode (required) | choices:
-
Off
-
On
-
Toggle
-
Set dictionary value
keyword: set_value_for_key
shortcuts identifier: is.workflow.actions.setvalueforkey
params:
- key (required, variables support)
- value (required, variables support)
Set variable: saves input to a variable with a name=name
keyword: set_variable
shortcuts identifier: is.workflow.actions.setvariable
params:
- name (required)
Set volume
keyword: set_volume
shortcuts identifier: is.workflow.actions.setvolume
params:
- level (required)
Set WiFi
keyword: set_wifi
shortcuts identifier: is.workflow.actions.wifi.set
params:
- on (required)
Show definition
keyword: show_definition
shortcuts identifier: is.workflow.actions.showdefinition
Show result: shows a result
keyword: show_result
shortcuts identifier: is.workflow.actions.showresult
params:
- text (required, variables support)
Speak text
keyword: speak_text
shortcuts identifier: is.workflow.actions.speaktext
params:
-
language (required) | choices:
-
Čeština (Česko)
-
Dansk (Danmark)
-
Deutsch (Deutschland)
-
English (Australia)
-
English (Ireland)
-
English (South Africa)
-
English (United Kingdom)
-
English (United States)
-
Español (España)
-
Español (México)
-
-
pitch (required, default=0.95)
-
rate (required, default=0.44)
-
wait_until_finished (required, default=True)
Split text
keyword: split_text
shortcuts identifier: is.workflow.actions.text.split
params:
-
custom_separator ()
-
separator_type (required, default=New Lines) | choices:
-
New Lines
-
Spaces
-
Every Character
-
Custom
-
Start menu
To build a menu, you have to write at least three actions:
- Start menu
- Menu item
- End menu
So the menu with two items will look like:
Start menu
Menu item title=1
... some actions...
Menu item title=2
...other actions...
End menu
As in other actions which have group_id
field, you don't need to specify it, it will be generated automatically.
keyword: start_menu
shortcuts identifier: is.workflow.actions.choosefrommenu
params:
- group_id ()
- menu_items (required)
Take photo
keyword: take_photo
shortcuts identifier: is.workflow.actions.takephoto
Text: returns text as an output
keyword: text
shortcuts identifier: is.workflow.actions.gettext
params:
- text (required, variables support)
URL: returns url as an output
keyword: url
shortcuts identifier: is.workflow.actions.url
params:
- url (required)
URL Dencode
keyword: urldecode
shortcuts identifier: is.workflow.actions.urlencode
URL Encode
keyword: urlencode
shortcuts identifier: is.workflow.actions.urlencode
Vibrate
keyword: vibrate
shortcuts identifier: is.workflow.actions.vibrate
View content graph
keyword: view_content_graph
shortcuts identifier: is.workflow.actions.viewresult
Wait to return
keyword: wait_to_return
shortcuts identifier: is.workflow.actions.waittoreturn