How does DT deal with Email Attachments?

Hi there,

Can someone explain to me how Devonthink deals with emails with attachments?

Ideally, I’d like to be in a position where DT is able to scan and categorise any files attached to the email that gets ingested into my database, but looking at early results, that doesn’t quite seem to be the case.

Can someone just confirm the best way for me to be able to ingest and store all of those PDFs, Powerpoints etc that have been sent to me on email?

Thanks in advance for the help!

Devonthink provides a collection of scripts for processing emails
as per the screenshot below

I use Add messages(s) & attachments to Devonthink
This generates a group holding the .eml and attachment files

To categorize, I assign tags to the group or attachment file
I can also move attachment files out of the group

Screen Shot 2021-04-21 at 12.10.56

Thanks very much @DTLow - the reply is much appreciated!

Just a couple of quick questions. I can’t find any Mail scripts in my standard Script Menu … but then I’ve moved all of my emails into a custom group already.

Can you just let me know whether the .eml files need to be in the Global Inbox to be able to access the script? Or alternatively, where I can download those scripts from to put into my seat?

Thanks again for your help. It’s really appreciated!

To be clear about the “standard Script Menu”
It’s listed at the Mac Menu bar, top right corner
Scripts are organized by application
. these scripts are listed when clicking the icon while in the mail app
. and function on selected entries listed in the mail app
Screen Shot 2021-04-21 at 13.16.28

Ah, you legend - I see it now. Thank you very much.

Am I right in thinking that those scripts are only available for the Mail app and not for Outlook?

Those scripts are specific to Mail, yes - but there’s a good chance they could be rewritten for Outlook. The other members of the Office suite have pretty extensive scripting possibilities (I don’t have Outlook installed, so can’t check specifically) and reworking the script should be straightforward.

Confirmed - this is a Mac Mail solution
Others will need to advise on an Outlook solution

1 Like

A quick search suggests that the current version of Outlook for Mac no longer supports AppleScript in rules… (as I said, I cannot check that). Equally, however, a quick check suggests it is possible to get Outlook to save attachments to a specific folder (outside Outlook) via a rule (using macros, apparently :flushed:); you could either set that folder to be the global inbox, or automatically import from another folder using e.g. Hazel.

@BLUEFROG: I can set up a smart group or rule with conditions Kind is E-Mail and Attachments is greater than 0 to show all E-Mails with attachments in my databases, but I cannot act on those attachments with rules or scripts (e.g. to extract the attachments to a folder) - is that correct, or have I overlooked something? Asking, because that would be an alternative to dealing with the attachment before moving the mail to DT.

1 Like

Once the emails are in DEVONthink, accessing the attachments should be considered as infeasible (i.e., technically possible but likely fraught with troubles).

However, you can still drag out the attachments from the emails in DEVONthink.

et al: If you’re using Outlook, be aware the New Outlook, i.e., their new interface, breaks AppleScripting it. Stick to the old interface if you want to script it.

2 Likes

Hi Blanc,

I had this exact issue today and actually made the same smart folder.

I found this older topic - OCR on PDF files attached to e-mails? - #63 by BLUEFROG

I then got the script there from BlueFrog, and ran it on all the emails in the smart group. Took about 15 minutes to get through it all but worked great.

I’m thinking about loading my outlook into Mail just to get the “Add attachments and Emails” script as it’s so useful. If you find an alternative I’d be very interested.