tanaike

The Thinker

Report: Implementing Pseudo 2FA for Web Apps using Google Apps Script

Gists Abstract In Google Apps Script, there is the Web Apps. When Web Apps is used, the users can execute Google Apps Script using HTML and Javascript. This can be applied to various applications. When the Web Apps is deployed with “Anyone”, anyone can access the Web Apps. And, there is the case that Web Apps deployed with “Anyone” is required to be used. Under this condition, when 2 Factor Authentication (2FA) can be implemented, it is considered that the security can be higher and it leads to giving various directions for the applications using Web Apps.

Workaround: createdDate cannot be used with searchFiles of DriveApp in Google Apps Script

Gists Unfortunately, in the current stage, in order to retrieve the file list using the created date, the search query of createdDate cannot be used with searchFiles method of DriveApp in Google Apps Script. This has already been reported at this issue tracker In this post, I would like to introduce a workaround for searching the files using the created date. Issue and workaround The parameter of “searchFiles” method of DriveApp uses the search query for Drive API v2.

Creating and Deleting Multiple Events in Google Calendar by Batch Requests using Calendar API with Node.js

Gists These are the sample scripts for creating and deleting multiple events in Google Calendar by batch requests using Calendar API with Node.js. In the current stage, unfortunately, googleapis for Node.js cannot request batch requests. Ref So, when multiple events are created and deleted in Google Calendar using Node.js, it is required to run the script in a loop. In this case, the process cost becomes high. Ref In this post, I would like to introduce creating and deleting multiple events in Google Calendar using batch request with Node.

node module - node-gbatchrequests

Overview This is a Node.js module to run the batch requests of Google APIs. Description In Google APIs, there are APIs where batch requests can be run. The batch requests can run multiple API calls by one API call with the asynchronous process. By this, both the process cost and the quota cost can be reduced. Ref In Node.js, the wonderful module of googleapis for Node.js is existing. But, in the current stage, unfortunately, it seems that the googleapis for Node.

Updating Array1 with Array2 using Google Apps Script

Gists This is a sample script for updating Array1 with Array2 using Google Apps Script. As a sample situation, there are 2 arrays (Array1 and Array2) of the 2-dimensional array. The sample situation can be seen in the above sample Spreadsheet. Conditions When the values of column “A” of Array2 are existing in column “A” of Array1, the rows of Array1 are updated by that of Array2. When the values of column “A” of Array2 are not existing in column “A” of Array1, the rows of Array2 are appended to Array1.