I am trying to develop a workflow for saving client related correspondence (received and sent) to the respective Client_Name/Email folder for each respective client in a “Client Files” database.
Ideally, I’d like to run some sort of automation on import that renames the email as
on import into the Client Files - “Client_Name/Email” database-folder.
I would also like to find a more efficient workflow for getting the emails (sent and received) to the respective folders for storing client emails.
I understand that I can drag and drop emails into the respective folders, but would like to know if there is any known automations that can simplify this within mail at the time of writing or archiving the email.
For context, when I was on Windows, I used to use a TechHit Outlook plugin called SimplyFile, which prompted me on every sent/archived email to save a copy (with smart filing feature) that would rename the email upon save.
Currently, with DT3 and Outlook for Mac, I’ve been drag dropping emails into the respective folders. The downside is that (1) no automatic renaming of the file on import and (2) Sent mails are a pain because at the end of the day I have to go back through sent mail to file correspondence sent by me, rather than have the option at the point of sending to file the email.
I understand that DT3 can’t do everything, but wondering if their are known workflow for such archiving of email. I’ve searched the forums but can’t see anything. But I imagine lawyers, project managers, etc who store client materials in DevonThink would have similar need.
I’m not opposed to using Apple Mail, if there is better support there for such workflows.
I use Apple Mail, with mail rules and applescript
This also includes Google email in a unified inbox
In Apple Mail, I created a DT folder
Sent email includes a BCC to myself; a rule automatically moves it to the DT mail folder
For received email, I manually move it to the DT mail folder
The applescript tuns every 5 minutes
and processes any email in the DT mail folder, importing it to Devonthink
The script can handle rename, tags, and distribution to folders
Okay, thanks for responding. So once it is in DT are you then moving it to the relevant “Client/Case/Project” folder for emails related to that project(s) (e.g. at the end fo the workday) or just keeping one database of all email?
I was looking for a solution for filing that operated at the point of wanting to file an email directly out of Mail.app, but I suppose I could have a two step process where emails I want filed first go into a DT3 database for Clients (or even a separate database for Client Email), then move to the relevant folder from within DevonThink.
I did consider BCCing myself by default. I’ve done that in the past, but I got annoyed by seeing emails to myself in the inbox. But I see from your note how that could be useful. The added benefit of BCCing and archiving the BCC sent mail is that I’d only have to archive “Archived” (and not “Sent”) email into my master archive in devonthink.
But without going to too much trouble, how do your scripts know which DT folder to put the email into once it is in DT?
Is it prompting you, or is it a simple filing script based on the name of the correspondent ? If it is the latter, then that won’t work for me as the same counterparty may be on several files I’m working on. Or maybe you are doing something else.
Okay! Thanks for the reply. I was envisioning something more complicated but your solution seems like it could work for me. I’m going to play with this idea.
Hello! I’m circling back on this after several years. I see you’ve posted your solution several times in this forum, but I can’t figure out the script to run on the email mailbox to get the email to devonthink. Would you be willing to share your script?
I understand that you run a script on your “email to…” folder which imports the emails to a devonthink database. I’d be curious to see what that script looks like.
Sorry, one other question. Are you maintaining client emails in a separate database for that purpose, or are you keeping client emails in the same database as other client related documents?
Thanks. Tron
I make use of the Devonthink delivered script Add message(s) & attachments to DEVONthink.scpt
launched from my customized script
click to see my script
set MailScript to (load script "/Users/DTLow/Library/Scripts/Applications/Mail/Add message(s) & attachments to DEVONthink.scpt")
tell application id "DNtp" to set theGroup to preferred import destination
tell application "Mail"
set theFolder to (POSIX path of (path to temporary items))
set TheMessages to (messages of mailbox "Devonthink" of account "iCloud")
repeat with theMessage in TheMessages
MailScript's imPortMessage(theMessage, theFolder, theGroup)
delete theMessage
end repeat
end tell
I use a single database for all my records
and make use of the email metadata indexed by Devonthink
I’ve been using this script and its been so helpful. One change I would like to make is to archive rather than delete the message. Do you know if I can just change the line “delete theMessage” to “archive theMessage” or do I have to set a folder as the archive then tell the script to move the email to “the archive”