tanaike

The Thinker

Workaround: Checking Existence of File ID in Google Drive without Access token and API key

Gists This is a workaround for checking the existence of file ID in Google Drive without both the access token and API key. When you want to check whether the file of the file ID is existing in Google Drive, generally, you might use Drive API and Drive service (DriveApp) of Google Apps Script. In this case, the scope of Drive API is required to be used. By this, the access token and the API key (in the case of publicly shared files) are required to be used.

Retrieving Values of Calendar Events of Smart Chips on Google Document using Google Apps Script

Gists This is a workaround for retrieving the values and URLs from the smart chips inserted in Google Document using Google Apps Script. Recently, the smart chips for Google Document are updated. Ref1 and Ref2 It is considered that this update will advance the collaboration for editing Document. So, there might a case that the information of the smart chips is required to be retrieved. Unfortunately, in the current stage, there are no methods for directly retrieving the information of the smart chips while the smart chips of DATE and PERSON can be retrieved.

Putting Multiple Hyperlinks to a Cell using Sheets API with Google Apps Script and Node.js

Gists I have submitted a report of “Workaround: Putting Multiple Hyperlinks to a Cell using Sheets API” before. At that time, there are no direct methods for setting multiple hyperlinks to the part of text in a cell. But, recently, textFormatRuns was added to Sheets API. By this, multiple hyperlinks got to be able to be set to the part of text in a cell. In this report, I would like to introduce a sample script for this.

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.