Where do notes attachment go when importing from Apple notes?

I’m using DT 3.5.1 on Mac OS 10.15.5. DT3 hat full disk access in system preferences and automation (system settings). I created a new database and selected “Import … Folder and Attachment from Notes”.

However, when I look at an imported note that contains one or more PDFs originally, there’s just the name of the PDF in it, no data. The database contains a sub-group “Attachment” with just two files, that are basically empty (around 40 bytes each).

I’m wondering if this is expected behavior due to Apple’s poor scripting support for Notes or if it is (god forbid :wink: a bug in DT3. Or if I have to look somewhere else for the PDFs.

Can you post screen captures of what you’re describing?
If it’s private, start a support ticket.
Cheers!

It’s not private enough to warrant a support ticket.
First how it looks in Notes (a note with a PDF). This PDF is actually shown in Notes when I activate the Attachment view, in the documents tab.

Now what I get in DT3 after importing Folders and Attachments from Notes:

No PDF to be seen, not even in the Smart Group:

Likely an issue with Notes’ AppleScript capabilities. I’ll try to reproduce it here.

Did you enable full disk access for DEVONthink 3?

Yes. I’m not sure if that’s related, but if I try to run a very simple script on Notes, it barfs when trying to get the attachments:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Notes"
	set myNote to the first note whose name is "Wanderomantik_am_Malerweg.pdf"
	set theAtts to attachments of myNote
end tell

The line set theAtts causes Script Debugger to say

„Notes“ hat einen Fehler erhalten: show id “x-coredata://12C06231-AFD4-4480-8708-61224CC091ED/ICNote/p8672” kann nicht in Typ specifier umgewandelt werden.

But this can of course be due to my limited scripting knowledge and be totally unrelated to the attachments disappearing on import.

It’s actually a related issue, the AppleScript support of Apple Notes is really broken on Catalina and DEVONthink’s import from Notes only works due to lots of workarounds (at least it works in most cases again).

I see. And the bug even works the other way round: If I have the attachment (going through the attachments list of the application), I can’t get to its container, aka the note it is in. Same error.

That’s unfortunately not the only thing broken or badely implemented in Apple’s automation. I’m not very confident that they’ll announce any improvement today. Lifestyle seems to be more important to them than productivity nowadays.

I would love to disagree but unfortunately I can’t.