Currently, we are creating a web application for employees to use.
We are building a system to register the data sent from the web application by using the spreadsheet instead of the DB.

Then, when I accessed with another account to check the operation and pressed the submit button in the form to send the data, the access approval screen was displayed.

I set it according to the following procedure, but I cannot send data.

  1. Add users from "Share" at the top right of the spreadsheet screen
  2. Select "Publish" from the script editor screen and select "Introduce as web application"
  3. On the settings screen, select "Execute the app as:" as "me" or "user accessing the web app"
  4. "Who has access to the app:" to "Anyone within company domain"

Was there something wrong with the procedure?
I clicked on the request for access permission and an email was returned, but I could not go to the access permission grant screen.

Is it a matter of corporate account permissions?
I would appreciate it if you could teach me.

  • Answer # 1

    There was an error in the logic that references the spreadsheet.
    SpreadsheetApp.getActivesheet () was calling the referenced sheet, resulting in an access permission issue as an error.

    I was able to access it when I called it with SpreadheetApp.openById (reference sheet).

Related articles