Link files to each other in one click?


I have the following question. Let’s say I have two documents that have the same substance, but are filed in different groups. That is because document A is an e-mail containing advice on subject X and document B is a memorandum containing advice on subject X.

I have a group containing emails with advice, and I have a group containing memoranda with advice. Therefore, these document A and document B are not in the same group.

Furthermore, I do not want to use tags because these are only two documents in the thousands of documents I have stored. If I tag them (and therefore start tagging a lot of other documents), the tags would become cluttered.

The documents also do not refer to each other in the “see also” section, because I always give my memoranda the title “memo […]”. Therefore, the “see also” of memorandum regarding subject X will refer to other memoranda.

Ideally I would like that with one click I could create a link in the metadata between the e-mail regarding subject X and the memorandum regarding subject X, so that when I have the memorandum selected I could skip with one click to the e-mail, and when I have the e-mail selected I could skip with one click to the memorandum.

“copy item link” and paste it in the “annotations” section or the “URL” comes close, but this only creates a one-way link. Therefore, if I would like to know if a creation of such bi-directional link is possible?

If not, how do other people deal with this (if any other people have the same use case as I have).

Any help would be really appreciated!


I use Hook - this is not a one-click solution, but the closest I could find. I have a smart rule which flags and tags all items which have a hook to another document - that way I notice that there may be more to a document than is obvious on first glance.


Both documents will contain a link to one-another in the links inspector (⌃7); one in the links section, the other in the incoming links sections if you use the default annotation.


Would you mind showing how you set that up blanc, I use hook but manually tag them.

It would be a great feature if DT could link in this way natively.

Sure, I followed Criss’ instructions here, using the smart rule with the second script. I did add flagging to my script (which I will post when I’m back at my Mac).

1 Like

Here is my modification of both the smart rule and the script:

-- The (scheduled) smart rule has to find items already tagged with "Hook" and to untag them as this scripts adds only the tag

property pTag : "Hook"

on performSmartRule(theRecords)
	tell application "Hook" to set hookedLinks to address of (every bookmark whose address begins with "x-devonthink-item://" and hooked bookmarks is not equal to {})
	tell application id "DNtp"
			set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "x-devonthink-item://"}
			repeat with l in hookedLinks
				set theRecord to get record with uuid (text item 2 of l)
				if theRecord exists then set tags of theRecord to tags of theRecord & pTag
				if theRecord exists then set state of theRecord to 1
			end repeat
			set AppleScript's text item delimiters to od
		end try
	end tell
end performSmartRule
1 Like

Wow that works great, thanks so much Blanc! (and Criss of course!)