Web Apps

Running Functions by Specifying Function Names with Web Apps for Google Apps Script

Gists

In this report, I would like to introduce the method for running functions by directly specifying the function names with Web Apps for Google Apps Script.

Description

It has already been known that the directly specified functions in the project can be run from the outside by enabling “API executable” and using the method of scripts.run in Google Apps Script API. In this case, the installation for using Apps Script API is a bit complicate. I think that this is making users difficult to use Apps Script API, although the important settings are including in the installation when the importance of the security is considered. As one of workarounds for making easy to run the directly specified functions in the project, I would like to introduce the method using Web Apps. When Web Apps is accessed, the functions of doGet() and doPost() are used. These are the reserved function name. But, when this method is used, the functions in the project can be run by directly selecting from the outside.

Protecting Cells of Spreadsheet that Users Copied from Your Google Drive to User's Google Drive using Google Apps Script

Gists

This is the method for protecting cells of Spreadsheet that users copied from your Google Drive to user’s Google Drive using Google Apps Script.

Situation:

This method supposes the following situation.

  • You want to make users copy a Spreadsheet on your Google Drive to user’s Google Drive. - Your Spreadsheet has several protected ranges. - Your Spreadsheet is shared with the user. - User doesn’t have own folder shared with you.
  • You want to protect the ranges of Spreadsheet for the user. Namely, you want to remove the user from the editor of protected ranges.
  • You want to achieve this using Google Apps Script.

Issue:

In above situation, I think that the following points are the bottleneck.