Gists
This is a sample Node.js script to retrieve access token from Service Account of Google without using googleapis.
const cryptor = require('crypto'); const request = require('request'); const privateKey = "###"; // private_key of JSON file retrieved by creating Service Account const clientEmail = "###"; // client_email of JSON file retrieved by creating Service Account const scopes = ["https://www.googleapis.com/auth/drive.readonly"]; // Sample scope const url = "https://www.googleapis.com/oauth2/v4/token"; const header = { alg: "RS256", typ: "JWT", }; const now = Math.
Gists
There are 2 sample scripts.
Create new Spreadsheet using a text value as CSV data. Overwrite the existing Google Document using a text value. When you use these script, please enable Drive API and retrieve your access token.
Create New Spreadsheet using Text Value const request = require('request'); const textData = "a1, b1, c1, d1, e1"; // This is used as CSV data. const orgMimeType = "text/csv"; const orgFileName = "sample.
Gists
This is a sample script for deleting the positioned images on Google Document using Google Apps Script. In the current stage, unfortunately, there are no methods for deleting the positioned images in Class PositionedImage, yet. But when Google Docs API is used, the positioned images can be deleted.
When you use this script, please enable Google Docs API at Advanced Google Services and API console. You can see how to enable them at here
Gists
This is a sample script for modifying the searched text to the small capital letters using Google Apps Script. Unfortunately, in the current stage, there are no methods for modifying the part of texts to the small capital letters in Document Service, yet. But when Google Docs API is used, this can be achieved.
When you use this script, please enable Google Docs API at Advanced Google Services and API console.
Overview This is a GAS library for notifying the change of number of comments, stars and forks of own Gists as an email using Google Apps Script.
Description Recently, I noticed that when a comment was posted to own Gists, and the numbers of stars and forks of own Gists were changed, the notification mail is not sent. Also I knew that in the current stage, there are no official methods for notifying them, yet.