shortcuts-action-icon-if.webp

Tests if a condition is true, and if so, runs the actions inside. Otherwise, the actions under “Otherwise” are run.

Score
Type
InterActivity
Expertise
5/5
Type
InterActivity
Expertise

Action Information

Parameters

If [Input: Select a Home Accessory/Shortcut Input/Clipboard/Current Date] [Condition: is/is not/is exactly/is not exactly/has any value/does not have any value/contains/does not contain/begins with/ends with/is after/is before/is today/is between/is in the next/is in the last]

Input

Anything

Result

(Anything) The input

Details

Type
Interactivity
Expertise Needed
Matthew's Score
5/5
Date Added
11/12/2014
Identifier
is.workflow.actions.conditional

Comments

Updated with iOS 13 to have different options to choose from depending on the type of input.

Place your Input in the action, then check the conditions to filter by that are available.

Works with Home automations.

Works Well With

shortcuts-action-icon-count.webp
Count
Counts the number of items, characters, words, sentences, or lines passed as input. Note (from Apple, for real) This is just like the Count in Sesame Street, but instead of a vampire, it’s a Shortcuts action.
shortcuts-action-icon-switch-to-lightdark-mode.webp
Switch to Light/Dark Mode
Switches to Light/Dark mode on the specified Apple TV.
shortcuts-action-icon-set-low-power-mode.webp
Set Low Power Mode
Sets the device’s Low Power Mode to on or off.
shortcuts-action-icon-set-playback-destination.webp
Change Playback Destination
Sets playback destination to a device. Device The device to set playback destination to.
shortcuts-action-icon-get-dictionary-from-input.webp
Get Dictionary from Input
Makes a dictionary from the text passed as input. JSON (like {“foo”: “bar”}), key-value pairs (like foo=bar&baz=biz), and XML-based plist are supported.
shortcuts-action-icon-get-dictionary-value.webp
Get Dictionary Value
Gets the value for the specified key in the dictionary passed into the action.
shortcuts-action-icon-dictionary.webp
Dictionary
Passes the specified list of key-value pairs to the next action as a dictionary.
shortcuts-action-icon-set-dictionary-value.webp
Set Dictionary Value
Sets a value in the dictionary passed into the action.
Log Health Sample
Adds a data point into the Health app.
Get the state of Home
Get the state of [name of Home set up in the Home app).
Control Home
Set the state of [name of Home set up in the Home app] by selecting scenes and accessories to automate.
Log Workout
Adds a workout into the Health app without requiring an Apple Watch. You can log all kinds of activities, from running and cycling to playing a sport.
shortcuts-action-icon-get-text-from-input.webp
Get Text from Input
Returns text from the previous action’s output. For example, this action can get the name of a photo or song, or the text of a web page.
Set Classic Invert
Reverses the colors of the display
Set Smart Invert
Reverses the colors of the display except for images, media and some apps that use dark color styles.
Open a document
Open a document.
shortcuts-action-icon-open-spreadsheet.webp
Open a spreadsheet
Open a spreadsheet.
shortcuts-action-icon-vibrate-device.webp
Vibrate Device
Vibrates the device for a short amount of time.
shortcuts-action-icon-nothing.webp
Nothing
This action does nothing and produces no output. It is useful to separate blocks of actions, or to ensure that no input is passed to the next action.
shortcuts-action-icon-set-wi-fi.webp
Set Wi-Fi
Sets the device’s Wi-Fi to on or off.

Shortcuts Using This

shortcut-open-mindnode-icon.png
Open MindNode
Opens MindNode – if run from iPad, opens in Slide Over.
shortcut-open-mindnode-for-mac-icon.png
Open MindNode for Mac
Opens the MindNode app for Mac directly or remotely via SSH.
shortcut-open-personal-youtube-playlists-icon.png
Open personal YouTube playlists
Presents a menu of YouTube playlists sorted into your “Personal” group, letting you choose one and open it in the app.
shortcut-show-youtube-library-icon.png
Show YouTube library
Opens the link to the Library tab of YouTube, which shows your History, Watch Later, Playlists, and Liked Videos.
shortcut-copy-youtube-playlist-link-icon.png
Copy YouTube playlist link
For links shared from videos playing inside a playlist, this will scrape out the ID and reformat it into the main playlist link.
shortcut-grab-youtube-playlist-id-icon.png
Grab YouTube playlist ID
For a given YouTube video passed in as input, this isolates the URL parameter after “list=“ that represents a video playlist ID.
shortcut-open-work-youtube-playlists-icon.png
Open work YouTube playlists
If you don’t want the Grab YouTube playlist ID shortcut installed, delete the Run Shortcut action above and the URL action below.

However, the shortcut won’t work with links from videos inside playlists anymore.
shortcut-open-my-youtube-playlists-icon.png
Open my YouTube playlists
Pulls from a dictionary of YouTube playlists and lets you pick from subgroups to open in the app.
shortcut-toggle-the-christmas-lights-icon.png
Toggle the Christmas lights
Turns your HomeKit Christmas lights on or off depending on the current state.
shortcut-write-down-gifts-received-icon.png
Write down gifts received
Creates a series of prompts to save a gift and the giver’s name to an ongoing note.
shortcut-send-thank-yous-icon.png
Send thank-yous
Asks you to pick from your contacts, then shows a Messages window for each so you can send a thank-you message.
shortcut-check-for-a-white-christmas-icon.png
Check for a white christmas
Looks for snow in the daily forecast for the next 10 days.
shortcut-check-the-weather-forecast-icon.png
Check the weather forecast
Displays the temperature in conditions between 7 AM and 7 PM for the next 24 hours.
shortcut-turn-on-the-fireplace-icon.png
Turn on the fireplace
Turns on the Apple TV and opens the Fireplace app, plus shows the remote.