yes - you run into permission problems - very common with the current MacOS. It is awful what Apple created here.
I had the same problems here - it was a try and error approach to solve it. I’m sorry that I can’t give you any hints but: search for Automator/AppleScript and security permissions. There is a way to solve this!