I am having trouble creating a Trigger in sheets. The error I am getting is "Action Not Allowed" when the code gets to .create(). What I do not understand it I can run this code on a doc in myDrive but if I use this code in a Team Drive sheet it does not allow it. How can I create a Trigger in a team drive sheet/doc?
ScriptApp.newTrigger('myFunction')
.forSpreadsheet('id')
.onEdit()
.create();
I have also tired
.forSpreadsheet(SpreadsheetApp.getActive())
.forSpreadsheet(SpreadsheetApp.getActiveSpreadsheet())