Import Mails based on Content?

Hi there!

Is there a way to import Mails from Apple Mail via Script into Devonthink?
So, for example, is there a way to import e-mails with specific contents into a dedicated database?

For now i am using the Preferences within Apple Mail to color-code Mails which do have a content important to me. But the automatic import-step into Devonthink is not there.

Any help is greatly appreciated,

Manuel

DEVONthink 3 > Install Add-ons… installs also various scripts for Apple Mail, both for the system-wide Scripts menu extra and rules in Apple Mail. To automatically add messages matching certain conditions a rule would be probably ideal.

Thanks - i already installed the additional Apple Mail Module.

But how can i use a smart rule for importing?
I can only find “Search in Databases” in the smart rule dialog, but not “Search in Mail”?

The rules of Apple Mail, not the ones of DEVONthink 3. After installing the scripts via Install Add-Ons… the Execute Script action of Apple Mail’s rules offers several scripts to add messages/attachments to DEVONthink.

1 Like

Perfect - that worked for me! :-)))

Thanks so much for the fast and helpful answer.

All the best,

Manuel

1 Like

I also use DT’s excellent Add message(s) & attachments to DEVONthink.scpt

The script can be modified to direct the email to specific databases based on content

1 Like