Mail Scripts not working in Catalina outside of Mail rule

Recently installed DT3 (v3.5.1) on a new MacBook Air with Catalina. I am able to use the “Mail Rule - Add messages to DEVONthink” script in a Mail Rule to add a selected message to DevonThink. But the corresponding script in the System Script Menu (“Add message(s) to DEVONthink”) does not work: it is triggered, and the popup opens for selecting a Group", but when I click OK in the popup, nothing happens other than the popup closing. The selected message is not added to DEVONthink. DT3 has full disk access.

If I open the script in Script Editor and run it there, it works as expected, but not from the menu. I am having similar problems with another script I wrote for forwarding selected emails – works in Script Editor but not from the menu.

Is this a Catalina bug? Or am I missing some kind of permission/access setting?

I’ve never seen that. Any messages in the log window? Could you post the script here?

Nothing in the log window. It’s just the standard DEVONthink script installed through DEVONthink 3 > Install Add-ons.

I found the solution! It was in fact a problem in Privacy Settings, but not Full Disk Access: I started looking at the other settings and discovered the settings for Automation. You have to allow “apps … to control other apps. This will provide access to documents in data to those apps, and to perform actions within them.” Top of the list is Script Menu. The box was checked to allow it to control DEVONthink 3.app, but not the one for Mail.app. That’s why it would bring up the DT3 popup to select a group, but then wouldn’t perform the Mail tells.

Checking in El Capitan, the only similar permissions I found were under Privacy > Accessibility, where you can “allow the apps below to control your computer.” Script Editor.app is listed, but it is not checked on my machine, yet the Script menu works there. So this appears to be a new wrinkle sometime post-El Capitan. I was unable to find evidence of the issue or a solution online, so I expect it must be fairly recent.

Yep, that is correct. You should always allow any Automation requests from DEVONthink for the best performance and functionality.