Open an indexed item in Devonthink from the Finder

When I have an item indexed in DEVONthink, say a file named myfile.pdf, there is an item link associated with that file. If I click on that item link from somewhere, that item is opened in DEVONthink.

What I do not see is a way from the Finder to open the indexed item in DEVONthink. If the item’s DEVONthink link was stored in the item’s extended attributes or something then it seems it should be possible to have an open in DEVONthink action in the finder. I am not seeing the link stored in the file attributes. If I use the normal Finder “Open with” and select “DEVONthink 3” then the indexed item is NOT shown or opened in DEVONthink.

Am I doing something the wrong way?

No, the reference URL is not stored in the extended attributes of any files in DEVONthink.

You cannot Open with using DEVONthink. That initiates an import operation.

Would anything break if I created some kind of AppleScript to store the URL in the extended attributes of the file? Then use that stored link to open the file in DEVONthink?

If DEVONthink is already running and the necessary database(s) opened, then the “lookup records with path” AppleScript command could be used to find the desired item in the databases.

1 Like

It shouldn’t break anything. In fact, there was this dicussion recently:

@mmynsted If you want to avoid storing the link in the file, here’s another discussion we had about looking them up with an AppleScript (which you can run as a service, Alfred, or whatever). These scripts all use the command that @cgrunenberg is referring to:

I could never quite figure out how to get the sidebar behavior the way that I wanted it, but it otherwise works quite well when opening one file at a time (from Finder to DEVONthink). I use it a lot with Alfred. But several others in that discussion - with a lot more experience than myself - shared their fantastic scripts and prior discussions, too. @ngan @pete31 @Stephen_C @korm @BLUEFROG

However, if you wanted to use that script I posted to embed URLs in the kMDItemWhereFroms field (below), you’d have to modify it to grab the item link. At the moment, it’s grabbing whatever’s listed in the URL field of DEVONthink. I created that script because I wanted the metadata associated with the source of my web clippings - i.e., the website where they were clipped from - to be embedded in the file itself, kind of like it would be if you were downloading it from Safari, etc. I sometimes use Alfred or HoudahSpot - outside of DEVONthink - to search for external files by their source, and so it’s helpful if embedded in the file (e.g., searching by NYTimes,, etc.). As a researcher, I also worry about the source of the web clipping ever getting lost (e.g., because I did something stupid in DEVONthink, and managed to sever the ties between the file and its metadata stored in DEVONthink). I wish this was done automatically with web clippings and that particular bit of metadata, but I guess I’m a bit of a worry-wart :smiley:


@BLUEFROG & @cgrunenberg - I don’t mean to hijack this thread, but since it came up, I thought I’d ask: Have you guys ever considered allowing people to open DEVONthink’s document window as a standalone viewer for external documents (feature request)? By standalone viewer, I mean without looking up the file in DEVONthink and showing its metadata, etc (e.g., almost like a standalone app associated with certain file types).

The reason I ask is that I’d love to make it my default app in Finder for opening formatted notes. I often just want to quickly highlight something in a formatted note that I’ve located in Finder, but I find myself needing to (1) use the script referred to above to look up the record in DEVONthink, or (2) attempt to view it in Safari, which is terrible. In these cases, I’m not changing anything that might screw up the record in DEVONthink, I just want to quickly read it while having the ability to highlight stuff - and have the convenience of double-clicking on the formatted note in Finder and opening it (without importing anything). Thanks!


Yes, I think it is better to look-up the item rather than store its link. Thank you!