Apple Mail Rule with Add to DEVONthink Plugin (Big Sur)

$ sudo tccutil reset AppleEvents com.apple.Mail

Successfully reset AppleEvents approval status for com.apple.Mail

Dragged an email from Apple Mail to DT3.

Email imported but still no Mail->DEVONthink 3 option in the System Preferences>Security & Privacy>Automation preference panel listbox.

Edited/tweaked a Mail Rule that has Run AppleScript -> Mail Rule - Add attachments to DEVONthink so that it would prompt to re-apply the rule across the inbox. Clicked Apply when prompted the rule ran but silently no reaction from the script.

No change. Hurumph. :cry:

Then I selected an individual message that the rule would apply to, right-click -> Apply Rules and bam:

Got the dialog:

"Mail” wants access to control “DEVONthink 3”. Allowing control will provide access to documents and data in “DEVONthink 3”, and to perform actions within that app.

Clicked the Allow button in the dialog and now the Mail->DEVONthink 3 option in the System Preferences>Security & Privacy>Automation preference panel listbox is there and is selected!

Woot!

However, in the DT3 log window I see:

7:43:07 AM: /var/folders/s9/pbxfzfrj6sbfcpk3dvvm70wc0000gn/T/com.apple.mail/TemporaryItems/invoice_29480.pdf “invoice_29480.pdf” couldn’t be copied because you don’t have permission to access “2”.

Damn that number 2, I know he’s pissed that he was passed over and not number 1 but come on. :face_with_raised_eyebrow:

So I rinse and repeat a few times picking various messages and manually Apply Rules on individual messages in Apple Mail and am seeing the same permissions errors in DT3 log repeatedly. Not quite working but that is some progress and looks like the ball is back in the DT3 court.

Does DEVONthink have Full Disk Access?

That did the trick. Working now.

Thanks @BLUEFROG

My pleasure :slight_smile: