Jump to content

Search Mail.app Workflow


Recommended Posts

Posted

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.

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

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

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
 
Posted

Case-insensitive results are not working for me - I tried fudging with the 'c aspect of the query but to no avail.  Can others relate if case-sensitive searches are working for them?

 

Thanks!

  • 2 weeks later...
  • 4 weeks later...
Posted

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!

Posted

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.

  • 3 weeks later...
  • 2 weeks later...
Posted

Hi, this is a brilliant workflow! Could you make it work with Postbox as well? (I really don't know how to program this myself).

thanks!

 

cheers,

Martijn

  • 4 months later...
Posted

I might be missing something, but is there a way to search multiple keyboards?  I want to search for say "jon" "ubuntu" to find emails with both these words in the email.

 

Thanks

 

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