Jump to content

Search Mail.app Workflow


Recommended Posts

The Workflow sure works great for me, but I'm trying to understand your approach (and create other workflows on the same idea for other e-mail clients).

Why use a script at all? Can the same thing be done with a filter?

You can limit the scope to ~/Library/Mail/V2 and use the kMDItemAuthorEmailAddresses, kMDItemAuthors and kMDItemSubject metadata fields.

What's wrong with that approach?

 

I'm unsure how it all works, because I've ran into a few things I couldn't figure out when I tried (eg: using kMDItemContentType didn't seem to make any difference at all, that's why I eventually had to resort to limiting the scope).

 

 

          Corentin
 

 

Correct, the same thing could be done with a filter but you cant format the way it is shown. I made an extension for Alfred v1 that did this very same thing with a filter. It would show the subject of the email as the title but would only show the file path as the subtext. By using a script filter I can make it show other useful information. I can make the subtext show who the email is from and other data as well.

Link to post
Would it be possible to write this to work for something like PostBox?

 

Sorry man I must have missed this question in the past. It may be possible. It would depend on how messages are stored with Postbox.  It seems like I checked into this before and it wasn't easily possible. I'll take a look again though.

Link to post
Correct, the same thing could be done with a filter but you cant format the way it is shown. I made an extension for Alfred v1 that did this very same thing with a filter. It would show the subject of the email as the title but would only show the file path as the subtext. By using a script filter I can make it show other useful information. I can make the subtext show who the email is from and other data as well.

 

 

I see. Thanks a million for the clarification. It makes a lot of sense!

 

 

          Corentin
 
Link to post

I found a new issue…

I performed a search on my own name and noticed that there is a problem with accent encoding in the results.

The From field displayed “Corentin Cras-Me\U0301neur” for my name. It failed to parse e\U0301 as é.

 

 

          Corentin
 
Link to post
  • 2 weeks later...
  • 4 weeks later...

This is a great workflow! Thanks!

 

Would it be possible to a) show all unread emails right after entering a keyword and B) reply to email meaning that I select an email and Mail.app open a window where I can write my reply to an email. Together, these two features would be pretty awesome!

Link to post

This is a great workflow! Thanks!

 

Would it be possible to a) show all unread emails right after entering a keyword and B) reply to email meaning that I select an email and Mail.app open a window where I can write my reply to an email. Together, these two features would be pretty awesome!

 

I need to go back and look at this workflow and see if I can add some additional functionality. This is one of the first workflows I created and could probably be tweaked a good bit from what it originally was.

Link to post
  • 3 weeks later...
  • 2 weeks later...
  • 4 months later...

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...