Google apps script error: “You do not have permission to call protect” [duplicate]
Custom function run anonymously so the implicit consequence is that they can not do anything that requires authorization. Changing a range protection requires an authorization , that’s why you can’t use it and get the message you get… Same situation for getEffectiveUser(), it requires an authorization too. Reference in docs : Unlike most other types … Read more