Apple’s automation triggers for it’s time-saving Shortcuts app are limited on iOS and entirely absent on the Mac. Fortunately, there’s a free app called Shortery that fixes that.
Source : This Free Mac App Adds the macOS Automation Triggers That Apple Forgot