I see three possible ways forward: (I don't own any of the apps you mention. So I can't check.)
If either of the two apps you mention support AppleScript, then there's a chance that KM could use that to detect what you are looking for. I'm not very adept at this approach.
If either of those apps has a log file that records actions that you perform, then KM could monitor it and use that information to detect when you click on something. I've done things like this before.
It may be possible to detect your clicks by having KM detect when you are clicking in the DevonThink app by intercepting your mouse clicks. This would be fairly tricky. But I've done this type of thing before.
You emphasized the word trigger. But some of these solutions involve polling, which is a little different from triggering. If you really want triggering, that will limit your options. Polling basically involves checking in an infinite loop, but polling can usually be done without too much of a burden on the CPU.
There are other people on this site who may come up with other solutions. That happens a lot with my advice.
If you could create a video showing what it looks like, that may help me give good advice.