Google Apps Script Protected Sheet Edit Permissions
00:56 01 May 2024

I have developed a google sheet apps script based data collection tool. To give a simplified context, I have a modal form for lets say user registration where users who are given edit access to the sheet can submit data through the form.

I have a script that takes the form data and appends to a hidden sheet that is protected and only I have edit access so that users can not look at other user information or edit their information on their own.

However when user submits the form the data is not getting ultimately appended to that protected sheet with the following error:

Error adding data: You are trying to edit a protected cell or object. Please contact the spreadsheet owner to remove protection if you need to edit.

I was expecting that since I am the owner of the google sheet and the apps script project, the scripts shall execute and data should get appended to my own protected sheet.

javascript google-sheets google-apps-script spreadsheet-protection