scheduled email import

I wondered if anyone knows of a script that would do the following, that could be assigned to selected email folders in a particular account in the apple mail program.

  1. automatically perform a daily import
  2. import email to relevant folders in DTPO database
  3. import & OCR any attachments to the global inbox
    My reasoning is that I would deal with all emails by moving them from the email inbox to an email folder by the end of each day, then have DTPO take care of the import while I’m reviewing other stuff I’ve put in there that day.
    It may be that I would need to write this or adapt other scripts (for which I would need to learn scripting :slight_smile: ) but it seems an obvious task so maybe something already exists?

The scripts in the folder ~/Library/Scripts/Applications/Mail might be a good starting point, especially Add message(s) & attachments to DEVONthink.scpt

Thanks, learning scripting it is then!