It always baffles me to know how you may not be the first person to have faced a particular challenge and that tens (if not hundreds) may've already reported similar grievances.
this was oddly a scenario where after i'd devised a solution, i stumbled upon a conversation that described the exact problem and an even more precise solution. thank you, stack exchange!
enter: getThreadID
Description
a google hangouts chat "bot" hosted on apps script, that returns a url of the conversation when invoked on a particular thread.
publishing bots - you'd also need to familiarise yourself with the different steps involved in actually publishing the bot, once you've adopted the code
(my two cents: just follow the instructions 🤓)
Codebase
you can access the entire script on my github repository here.