Jump to content

Display/search flagged mail messages

Recommended Posts

Is it possible to create alfred worklfow that will display flagged messages in Apple mail ? Thanks.


It more than likely is but would probably require a little Applescript to pull it off. Pedro Lobo's Mail Actions workflow may do this. I'm not sure what all he's added to his workflow.

Link to comment

i was just looking into doing this the other day.  Unfortunately Applescript doesn't expose the Flagged mailbox or smart mailboxes.


You can do it with UI scripting if you add the Flagged mailbox to the Favorites Bar (the list of mailboxes right below the menu).  In my case the Flagged mailbox is the 5th from the left, so this works - change the keystroke depending on where you have the Flagged mailbox.  This is not an optimal solution b/c if you forget and add another mailbox to the left of Flagged, you'll need to edit the script.  Also, you need to use a "Run Script" workflow object, set to usr/bin/osascript, not "Run NSAppleScript" (no idea why, but it works in one and not in the other).


activate application "Mail"


tell application "System Events" to tell process "Mail" to keystroke "5" using command down

Edited by dfay
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...