How to setup a link between TB and DevonThink4

I am looking for suggestions on how to efficiently place links between TheBrain14 and DevonThinkPro4.

Currently, from DT4 I copy an item link that looks like this:
x-devonthink-item://4DA5220B-F7F5-49E2-BDD0-4F4C8332B51A
That is pasted to a Thought as a link.
In addition, then I have to add a bit of code at the end of the link so that it looks like this:
x-devonthink-item://4DA5220B-F7F5-49E2-BDD0-4F4C8332B51A?reveal=1
The last bit allows the target to open within the open window of DT4. Without it, a separate window opens.

I currently copy with DT4, paste in TB, then open the link address, where I use a Keyboard Maestro keystroke to add the last bit. Close. This does not rename the link, if I want to set the name of the link to be the same as the Thought then I have to copy the Thought name, edit the link to rename it by pasting and saving.

There has to be a better way.

Perhaps with Keyboard Maestro I can create an action where I paste an "x-devonthink-item://…", it automatically adds the last bit of code to the link, and somehow renames the link to the Thought that is holding the link. I don't know how to do this but I am open to suggestions.

Any suggestions are welcome.

If you override the Command-V (Paste) for the application TB, you can first simply execute the past function of TB. There is probably a menu entry Paste that you can cell from KBM. Next you check if the clipboard contains a URL that starts with x-devonthink-item://. If it does you simply type the remaining part ?reveal=1 after you did the regular paste.

Smart. Got it. Thanks @fap

Still have to figure out how to get the Thought name from TB. Will ask that at their Forum.