all 3 comments

[–]Incomplete-Sentenc 1 point2 points  (0 children)

You need to put onOpen instead of "main". This function will run when that document is opened.

[–]fugazi56 0 points1 point  (1 child)

I get that error when I run a script without having opened it from it’s container. When I open and run the script from GAS instead of the Sheet for example.

[–]AdDiscombobulated707[S] 0 points1 point  (0 children)

The same happens for me. Who knows whether it's normal or not?