Jump to content

Quick search for email and messages


Recommended Posts

Hi, I've searched for quite a while and I'm not sure if I used the wrong keywords or terms, but is there anyway I can do a quick search with a name in Alfred and have conversations and emails pop up (like in Spotlight)?

 

I've reindexed everything, and I have the email and messages boxes unchecked in the don't show section in file search. I've also tried adding /Library/Messages into search scope but that didn't yield any results either. Is there anyway I can do this at all?

 

Any help would be much appreciated.

Link to comment

 

9 minutes ago, Machinegun said:

I've also tried adding /Library/Messages into search scope

 

That's the wrong directory (if you're using Mail.app). It's ~/Library/Mail that you want.

 

Personally, I'd recommend creating a separate File Filter to search your emails. As above, set the Scope to the directory where your emails are stored, then drag an email file into the File Types list.

Link to comment

@Machinegun Welcome to the forum! :) As @deanishe suggest, a File Filter workflow is ideal for searching specific types/locations like emails.

 

If you'd like to search Mail.app by sender, you can use this workflow if you're using macOS Mojave or older OS version.

 

[Edited to add: This workflow will only work on macOS 10.14 Mojave and older. Apple have removed access to Mail content for third parties from 10.15 Catalina onwards, so no results will be returned in these macOS versions.]

 

 

Cheers,
Vero

Link to comment

Thanks for the replies and I'll definitely try it when I have the chance. Is there anyway I can do a file filter workflow with iMessage conversations?

 

Thats what I meant when I added a scope for Library/Messages but nothing still comes up or is it chat.db?

 

Edit: I figured it all out with the advanced parameters and what not. Thanks for pointing me in the right direction.

Edited by Machinegun
Link to comment
  • 7 months later...

Hello 

I have the same question, I can't find in iMessage text, in alfred 3. on MacOS 10.13.4, 

 

when I update MacOS 10.12 to 10.13, alfred search iMessage can't find  in iMessage text.

 

*** Wednesday, May 2, 2018 at 19:59:51 ***

When I update "Security Update 2018-001"  https://support.apple.com/en-us/HT201222

 

I can use alfred search iMessage text.

 

At 10.13.1 - 10.13.3 can't search. 

Edited by RueiShuYe
Link to comment
  • 2 years later...

@apndavies Which version of macOS are you using?

 

There was a direct link to the workflow higher up in this thread (which I've now removed, and added the caveat), so I'm guessing you haven't seen the notice in the original post here:

 

Unfortunately, this workflow is only suitable for macOS Mojave and older, as Apple have removed access to Mail content for third-party apps from Catalina onwards. As such, if you're on Catalina or Big Sur, you won't see any results returned.

 

Cheers,
Vero

Link to comment
  • 3 months later...
  • 3 weeks later...
  • 2 years later...

On 2 December 2020 Vero wrote

Quote

There was a direct link to the workflow higher up in this thread (which I've now removed, and added the caveat)

I'd be interested to know if the workflow is still available, since while Mail mayb no longer be searchable there is no such limitation with MailMate, and I'm wondering if the workflow is adaptable.

Thanks

Link to comment

@NickSloan Different apps store their mail data in different locations, so the workflow won't automatically be adaptable.

 

However, a quick look online shows that MailMate does have the option to be searched by Spotlight, which is promising:

https://lists.freron.com/mailmate/2020-April/012477.html

 

Might be worth dropping the MailMate folks if you're not sure how to do this - Once you know the location of the email data, if MailMate makes enough data seearchable, it should then be possible to create a search workflow for it.

Link to comment

Thanks Vero. I already know that the MailMate data is searchable and where it is stored, it is just a question of how to whip up a workflow to search messages according to header criteria (from/subject etc). It's probably not as simple as substituting fields in an existing workflow, but it seems like that might be a good place to start?

Link to comment

@NickSloan It completely depends on where MailMate stores files and whether shares its data in the same way. 

 

Here is an old copy of my Mail.app workflow - which is for information purposes only, as it no longer works on current versions of macOS:

https://www.dropbox.com/s/5h3djhw2thf8xjp/Mail.app Search 3.0.alfredworkflow?dl=0

 

You can take a look at the three File Filters and experiment in replacing the search scope, as a starting point. 

 

Another tip is to drag an email file into the File Troubleshooter (in Alfred's prefs > Help > Troubleshooting > Run Troubleshooting...) which will allow you to see the metadata available for individual email files.

 

Hope this helps! :)

Link to comment
  • 2 weeks later...

I have found a much simpler way of achieving what I was looking for in a MailMate-adapted workflow.

 

Apparently MailMate has it's own URL scheme (see here). It is easy to compile a simple workflow (or web search) in which mlmt:quicksearch?string={query} is entered as the URL in an Open URL action triggered by a keyword such as mmt.

 

MailMate searches can then be initiated from Alfred using the same search syntax in the Alfred search bar that you would use in the MailMate search box. If, like me, you search in MM many times a day, this shaves several clicks off each interaction and makes for a more comfortable typing experience. It is also better than a multi-keyword approach since, it keeps the search syntax consistent across apps.

 

Probably obvious to many, but helpful I hope to some other MailMate users.

Edited by NickSloan
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...