I ran into the exact same problems as the OP. I just bought DEVONthink 3 Pro to automate my incoming emails to be sent to DEVONthinks inbox so I have all my incoming (electronic) mail in one place. But first, I got confused by the names starting with āAddā and āFileā like the OP ā it seems they both mean āAddā, they just create different file types. I think the wording could be improved here.
Next, I ran into an issue with Apple Mail itself (where we have to blame Apple) where when I was trying to apply a rule that both moved a message to a specific folder and ran a DEVONthink script, the script seemed not to work. Iām guessing because Apple mail did the āmoveā first (even though I didnāt set up to be first) and then the paths were broken. But I found an easy workaround (which is the main reason Iām writing this message), let me share:
Instead of relying on an Apple rule to do both actions (send to DEVONthink & move/delete email), you can simply do both in the AppleScript. To do that, open the folder containing the AppleScript files from DEVONthink ā Apple provides a neat shortcut button āOpen in Finderā in the dropdown, see screenshot:
Then duplicate the AppleScript you would like to adjust, rename it (I called it Send to DEVONthink Inbox & move to @DEVONthink mailbox
), double-press to open the Script Editor and add the following line right before the closing end repeat
of the repeat with theMessage in theMessages
body (itās the last end repeat
in my case):
set mailbox of theMessage to mailbox "<YOUR_FOLDER_NAME>" of account "<YOUR_ACCOUNT_NAME>"
Donāt forget to replace <YOUR_FOLDER_NAME>
and <YOUR_ACCOUNT_NAME>
with the proper names in your case, e.g. with the folder named @DEVONthink
and an account names Gmail
it would be:
set mailbox of theMessage to mailbox "@DEVONthink" of account "Gmail"
Hereās a screenshot of what it looks like in full:
If you simply want to delete the email, you might want to use the delete
command, but @Blanc strongly recommends against this here below. Instead, itās safer to move mails you want to delete to some āTrashā folder with the above method.
Hope it helps.