Shortcuts Tips: Drag Items Onto a Docked Shortcut
Since macOS lacks a system-wide share sheet as powerful as the one in iOS and iPadOS, Shortcuts users have had to get creative to get data in and out of their favorite shortcuts. The ‘If’ action getting new smarts about device details combined with AppleScript has helped fill in some blanks, but those solutions involve more in-depth knowledge than I’d expect a general use to have. Today’s quick tip requires something that every Mac user should already be familiar with: drag-and-drop.
Because shortcuts can be made into “applets” (basically mini-apps), they gain special functionality. The key is simply adding a shortcut to your Mac’s dock using the ‘File’ menu. As John Voorhees thoroughly documented on MacStories, once a shortcut is exported outside the Shortcuts app, it can live in the file system and act like other fully-fledged applications. This enables it to run with items dropped on its icon as input.
Particularly for file or image-based shortcuts, drag-and-drop makes running them accessible and intuitive. And for shortcuts set up with a ‘Repeat with Each’ action, scores of files can be acted upon just by dropping the group on top of the shortcut’s icon.
I use this feature most to upload photos to my CDN for this blog. Since screenshots taken with Cleanshot X don’t offer services in their context menu, this is the most surefire way to get an image from anywhere on my Mac uploaded using my shortcut.
Though this is my most common usage, drag-and-drop can be helpful for all kinds of shortcuts. You could rename a batch of files. Or select text and drop it to save to an app like Drafts or Bear. Or batch crop, convert, and/or resize images to a specific format. The possibilities are as endless as Shortcuts itself.
I’m sure more advanced functionality for Shortcuts will come to the Mac. Hopefully, it starts with revamping the macOS share sheet, but I’d also suggest to the Shortcuts team to include more visual clues when a shortcut is running. As it stands, you don’t get much feedback when one is activated via drag-and-drop. But for now, the fact that these workarounds actually work is good enough for me.