How do I run a script after renaming a collection in the Outliner?

Hello everyone. I’m not a programmer. I need a script to simplify my work in Blender. How do I run a script after renaming a collection or object in the Outliner? For example, I entered the name of the collection in the Outliner and immediately after entering the name, the script was launched. Thank you very much.

Hi man,
you can make the script an operator, and give him a shortcut !
check out this answer Quickly accessing a script

Hello, I think it’s not easy as it sounds…
You can add a new properties to collections like “name_b”, and that can execute some scripts when it changes, but I’m not sure it’s doable with already existing properties.

This is how you tell a props to update :

Maybe if you don’t find answer here , try https://blender.stackexchange.com/