"Open this indexed file in DEVONthink" script/service?

Does anyone have a script or service of some kind that reveals an already-indexed file from Finder in DEVONthink? (And/or copies the DEVONthink item link from a right-click in Finder?)

It shouldn’t be too complicated to make, but before I redo someone’s work, I thought I’d check.

A basic wrapper would look like this:

tell application id "DNtp"
	tell application "Finder" to set these_items to the selection
	
	repeat with this_item in these_items
		set this_path to POSIX path of (this_item as alias)
		repeat with theDatabase in databases
			try
				set theRecords to lookup records with path this_path
				repeat with theRecord in theRecords
					-- Insert desired actions here
				end repeat
			end try
		end repeat
	end repeat
end tell

@ryanjamurphy It’s not perfect, but this script should do what you want: Script for opening an indexed file or folder/group in DEVONthink from an external app (e.g., Finder, Alfred, HoudahSpot, etc.)?

Great, I’ll start with these. Thanks to you both!