If a Mac shortcut always reads the same file, a path typed into an action can break when that file moves or has a different name on another Mac. Pass the file into the shortcut at run time instead: accept a file from another app’s Share menu, then connect that input to the action that needs it. This guide shows how to set up that workflow, and when a prompt is or is not the right alternative.
Choose how the shortcut should receive the file
Use shortcut input when you can select the file in Finder or another app each time you run the shortcut. In Shortcuts, enable running the shortcut from another app, then set its accepted input type to Files. Apple defines Files broadly to include documents, images, PDFs, ZIP files, and more. The receiving app passes the shared item to the first action of the shortcut. Understanding input types in Shortcuts on Mac
For example, a shortcut that processes a document can start with the received file and continue into an action that extracts text, renames it, or otherwise handles it. The key is to use the incoming item as the next action’s input, rather than entering a fixed location in an action such as Get File. Apple describes action connections as the flow that carries one action’s output into the next action. Action connections in Shortcuts on Mac
Choose Ask for Input only when the user should type a value at run time. Apple documents it for words, dates, and numbers; it is not a file picker. For choosing a file interactively, use the shortcut’s file input from another app, or look for a file-selection action available in your specific shortcut workflow. Don’t put a file path into a text prompt and expect Shortcuts to turn that text into a selected file automatically. Use the Ask for Input action in a shortcut on Mac
Set up file input in Shortcuts
Open Shortcuts on your Mac, create or open the shortcut, and click its Details button in the editor. Enable Use as Quick Action or the available option to run the shortcut from another app. The exact launcher choices can vary with macOS and shortcut settings.
In the shortcut’s input control, click the current accepted type, often shown as Any. Select Files and turn off types the workflow does not need. Apple notes that input limits control when the shortcut appears in an app’s share options; a shortcut limited to contacts, for example, will not appear when sharing from Maps. Limit the input for a shortcut when run from another app on Mac
Make sure the first action that handles the document uses the shortcut input. In the action, click the input field and select the incoming shortcut input or Magic Variable, if it is not already connected. Then keep the remaining actions downstream from that file. If unsure whether two actions can connect, Control-click an action and choose Show Info to inspect its accepted input and output types. Action connections in Shortcuts on Mac
In Finder, select a test file, open the contextual menu or Share menu, and run the shortcut. When offered, choose the shortcut as a Quick Action. Repeat with a file in a different folder to confirm the workflow depends on the selected item rather than a particular location. This is a practical check for your own shortcut, not a guarantee that every action accepts every file format.
Decide what happens when there is no file
A shortcut launched from the Dock or another place that provides no item may receive no initial input. Apple’s input settings let you choose what happens in that case: stop with an optional response, ask for a supported input type, get the clipboard, or continue with an empty input. For a file-processing shortcut, stopping with a clear message is useful if the workflow must have a file to proceed; continuing can pass an empty value to later actions. Limit the input for a shortcut when run from another app on Mac
If the shortcut should work both from Finder and when launched alone, configure the no-input behavior deliberately and test both launch routes. A clipboard fallback only makes sense if users will copy the intended file or content first. Do not assume that selecting a file in Finder makes it available to a shortcut launched separately; the shortcut must be run through a route that passes that selection in.
When a fixed path still makes sense
A fixed path can be reasonable for a shortcut that always reads a stable resource on one Mac, such as a known local template, and is not meant to be selected each time. For files people choose on each run, shortcut input keeps the selection outside the action configuration, so renaming or relocating a chosen file does not require editing a stored path. It does not, however, make an unavailable file accessible: the file still needs to be present and readable, and subsequent actions must support its type.
The practical rule is simple: if the user chooses the file, receive it as shortcut input; if the user enters text, use Ask for Input; if the shortcut always uses one known resource, a fixed path may be appropriate. Set the accepted type and no-input behavior to match how the shortcut will actually be launched, then pass the received file through the actions that process it.
Sources
- Understanding input types in Shortcuts on Mac — Apple Support
- Action connections in Shortcuts on Mac — Apple Support
- Use the Ask for Input action in a shortcut on Mac — Apple Support
- Limit the input for a shortcut when run from another app on Mac — Apple Support