I use a ScanSnap to place documents in an ‘Action” folder; thereafter Hazel runs rules according to file contents. I have a routine that renames a file, and adds several tags before moving it to a DT group using that group’s UUID.
The tags show up for a brief moment and then are deleted inside DT. I have disabled all of my smart rules to ensure there is not a conflict there. The ‘Window —> Log’ does not show anything related.
Script and screenshot of Hazel rule follow…
tell application "Finder"
set _path to (the POSIX path of theFile as string)
set {_name, _extension} to {name, name extension} of theFile
-- optional: hide extension in Finder
set extension hidden of theFile to true
-- optional: remove extension for DEVONthink displays
set _name to text 1 thru -((count _extension) + 2) of _name
set _extension to "." & _extension
end tell
-- Launch DEVONthink if it isn't already open.
tell application "System Events"
if not (exists process "DEVONthink Pro Office") then
tell application id "DNtp" to activate
end if
end tell
-- Import the file.
tell application id "DNtp"
set theGroup to get record with uuid "26E698F9-9479-4F45-8B26-473DE1CBEA2C"
-- choose one option, Index or Import, comment out the other
set theImport to import _path name _name to theGroup
-- set theIndex to indicate _path to theGroup
end tell