"UUID already in database"

Using DevonThink Pro 3.8.6 on Mac Ventura.

  1. Imported a number of emails from Apple Mail via in Apple Mail / Message / Add to DevonThink 3

  2. Imported them in to DevonThink Pro global inbox.

  3. Selected them all (Edit / Select All).

  4. Then dragged them all into a folder in another database.

  5. Some of the files left behind in the global inbox, and in the log the files are showing as “UUID already in database”

  6. Looking at the folder into which I dragged the files, none of the files left behind in the global inbox are in there.

Is there a solution to this?

The error message means literally what it says: a mail with the same UUID is already contained somewhere in the database (and that somewhere could be the trash, too). Looking only in the receiving group is thus not sufficient.

Empty trash to be sure the email isn’t present there.

Unfortunately it is possible for two mails to have the same UUID, although that is one of the few problems I haven’t experienced with Mail. If that should be the case, you will not be able to import them to the same database.

The forum search throws up numerous on topic results when searching for “UUID mail”.

1 Like

Thanks for the reply.

I have seen some of the other posts. But none of the solutions work (including emptying the trash).

However, I did find a solution. For those emails which failed to move from the Global Inbox into to another database I dragged these into a folder in Finder, and then dragged them back into DevonThink Pro.

The modified date is still retained for the email with this work around.

It would be good to hear from DevonThink what is the precise issue.

The issue is that you are trying to import a mail with the same UUID as one which is already in the database. DT prohibits you from doing that. When you drag a mail from Mail to a folder in Finder, that message appears to lose its UUID, which is why you can then import it into DT. The basis for that assertion is that I imported a mail to DT, then checked its UUID using:

tell application id "DNtp"
	set theRecord to selected record 1
	return uuid of theRecord
end tell

I then proceeded to drop the same mail from Mail to Finder, and then dragged it from Finder to DT. Using the same script, that item now has a typical DT UUID rather than a typical mail message ID (which ends with @something rather than simply consisting of a hex code in blocks of 8-4-4-4-12 digits).

However, I cannot confirm that the modified date remains unchanged when importing in the fashion you describe. YMMV, it is conceivable that one of my smart rules is changing things.

2 Likes

@Blanc is spot on with his assessment of the issue and the reason your subsequent action worked.