Use the Choose from Menu action in Shortcuts on Mac
The Choose from Menu action lets you decide what a shortcut should do when it’s run. You choose from a predefined list of options to have each option run a different series of actions. This allows shortcuts to maintain their rigid structure but remain flexible (depending on the runtime context).
Whereas the Choose from List action presents a list of items to pick from when you run a shortcut (such as an image or a song name), the Choose from Menu action presents a list of options, making it possible for the shortcut to do different things depending on what you choose when you run the shortcut. Think of the Choose from Menu action as creating a fork in the road of your shortcut—the shortcut is sent in a different direction depending on the chosen option, resulting in a unique behavior.
Each menu option in the Choose from Menu action has a corresponding marker—a tag below the Choose from Menu action in the shortcut editor. Each marker represents a different pathway the shortcut may take at that point. Place the actions that you want the shortcut to perform under the marker for a specific menu choice. For example, if you add a Choose from Menu action with two options—”Nice to meet you” and “Great seeing you again”—you could add a Text action under the “Nice to meet you” marker and enter the text string, “It was great meeting you today!” When you run the shortcut, choosing “Nice to meet you” passes the text string “It was great meeting you today!” out of the Choose from Menu action into the next action in your shortcut.
Σημείωση: Although you may notice a line in the center of the screen that connects each action, the shortcut actually skips the actions for the options you didn’t select. Choose from Menu lets you pick only one option, and that selection determines which actions are used.
Συμβουλή: You can also use variables in the names of each menu option to make them dynamic. For example, you can add the Current Date variable to the “Great seeing you again” option. When you run the shortcut and choose “Great seeing you again,” the current date is automatically added.