22 minutes ago, Dominique said:
Not sure what you are looking for:
Perhaps we are getting to the root of the problem. How are you running this script? If you're not running it using "Test Script" in the LM GUI, then it won't work. You will have to build some sort of LogicModule to run this code. My suggestion is that it be a PropertySource. They run regularly and can store the output of the execution as a property that you can use for grouping/reporting to identify which ones are getting renamed.
Have you started building a PropertySource? This would also let you not embed your api key and token in your script. I'll go back and edit your posts to remove them, but I suggest destroying that token and generating a new one. Like, you should do that right now. Like, right now.