developer scratching head over auth choices
API Specific

Application Default Credentials with Google Cloud and Workspace APIs

Authentication and Authorization are probably the most confusing aspects of working with APIS. There are so many different options that it’s hard to pick which one to use, and the examples and documentation often refer […]

color strip deduplication
Apps Script

Color Vector embeddings vs Video Intelligence API labelling

In Making a film color DNA I described how I was using both color strips and labelled content to find videos that were duplicates or similar. I’m already using ElasticSearch to disambiguate films using labels and object tracking artefacts identified by the Google Video Intelligence API. The next step is to enhance that similarity matching using the color strips of a film as finger prints. […]

convert pdf to multiple images
API Specific

Manipulating PDFS in Apps Script

If you’ve used my Convert any file with Apps Script you’ll know that it can take a wide range of files (currently 53 different mimeTypes, 42 types of imports, and 26 kinds of exports) and […]

js proxy
Apps Script

Extending a cache client with a proxy

Extend a client library object by proxying and intercepting calls to its native methods. This example adds functionality to a redis client, and also gives tips on using GCP secret manger for configuration. […]

filmid
Apps Script

Proxy magic with Google Apps Script

I’ve written a few articles on here about JavaScript proxy and reflect. I use both extensively not only in Node projects but also in Apps Script. In this article I’ll demonstrate how to extend built-in […]

Detect fake news AI generated
API Specific

Detect fake news with Google Fact Check tools

I came across Google’s FactCheckTools API today, so I thought it might be fun to add to my bmApiCentral Apps Script library. This API can be used to both search popular fake news claims and […]

random contrasting font colors
Apps Script

Calculate contrasting font colors for Sheets.

If you are playing around with Sheet colors with Apps Script, you sometimes find yourself with font colors that don’t go well with the background colors you’ve chosen. However, we can use Yiq values to […]

Superfetch plugin
Apps Script

SuperFetch caching: How does it work?

SuperFetch is a proxy for UrlFetchApp with additional features such as built-in caching – see SuperFetch – a proxy enhancement to Apps Script UrlFetch for how it works and what it does. This is another […]

superfetch tank drive
Apps Script

SuperFetch plugins: Tank events and appending

Tank and Drv are SuperFetch plugins to emulate streaming and use the Drive REST API with Apps Script. SuperFetch is a proxy for UrlFetchApp with additional features – see SuperFetch – a proxy enhancement to Apps […]

superfetch tank apps script streaming
Apps Script

SuperFetch Tank Plugin: Streaming for Apps Script

Tank is a SuperFetch plugin to emulate streaming with Apps Script. SuperFetch is a proxy for UrlFetchApp with additional features – see SuperFetch – a proxy enhancement to Apps Script UrlFetch for how it works […]

Goa Oauth2 for Apps Script
Apps Script & Java Script

Apps Script Oauth2 library Goa: tips, tricks and hacks

Motivation Goa is a library to support OAuth2 for Apps Script connecting to a variety of services, using a variety of Authentication flows and processes. There are plenty of other articles on Goa on this […]

goa twitter oauth2 apps script
Add-ons

Apps Script Oauth2 – a Goa Library refresher

It’s been a few years since I first created the Goa library. Initially it was mainly to provide OAuth2 authorization and authentication to be able to access Google APIS and services unavailable via App Script. […]

SuperFetch
Apps Script

SuperFetch plugin – Firebase client for Apps Script

Frb is a SuperFetch plugin to easily access a Firebase Real time database. SuperFetch is a proxy for UrlFetchApp with additional features – see SuperFetch – a proxy enhancement to Apps Script UrlFetch for how it […]

Apps Script & Java Script

Iterator magic – Splitting an array into chunks

It’s a pretty common requirement, especially when you’re posting to an API, to split an array of data into manageable chunks, and most often the solution is to make an array of arrays – with […]

Add-ons

Add-on for decrypting columns in Google Sheets

In Merging sheets from multiple sources and encrypting selected columns I published some code for selectively copying columns from multiple input spreadsheets/sheets to create summary sheets, and optionally encrypting columns. The idea was to distribute the […]

Add-ons

Refreshing an oauth token in add-on

It’s very convenient to use ScriptApp.getOAuthToken() in an addon to reuse the token from the server side in your client side add-on code. However, these have a limited time to live (1 hour), so what […]

apps script v8
Apps Script

Proxy implementation of Apps Script GraphQL Class

In Resuscitating the Apps Script execution transcript – JavaScript Proxy and Reflect to the rescue I showed how we could use the ES6 Proxy global object to intercept calls to Apps Script services so we could […]

apps script crusher on github
Apps Script

Github as an Apps Script cache platform

Github as an Apps Script cache platform Another plugin available for Apps script library with plugins for multiple backend cache platforms so we can use Github as a back end for caching large objects across […]

upstash graphql explorer
Apps Script

Upstash as an Apps Script cache platform

Upstash as an Apps Script cache platform Upstash is a brand new service offering a serverless redis over https  via a GraphQL  API. Previously redis was hard to use along with Apps Script since we […]

info card on hover or click
Apps Script

4 ways to customize scrviz info card behavior

Info Card customization By default the info card appears when you hover over a node in the scrviz visualization. Although the info card is they key tool for investigating scrviz entries, it can be annoying […]

Apps Script

Enrich your developer profile on scrviz

In Showcase your Apps Script work and get hired via vizzy I showed how scrviz could be used to show off your Apps Script work to potential clients, so they could see what kind of […]

gapi and vuex
Apps Script & Java Script

Google gapi, Vue and Vuex together

JavaScript authentication with Gapi is both impressive and frustrating. Frustrating because in most of the examples you come across, and indeed in Google’s own guides, gapi is the center of the universe.  They are about […]

Add-ons

Handly helper for fiddler

If you use some of my libraries, you may have come across  the Fiddler class, which abstracts sheet data and provides a more functional way to manage data from multiple sheets in a Google Spreadsheet. […]

apps script v8
Apps Script & Java Script

Apps Script V8: Keystore for global space

One of the challenges with Apps Script V8 compared to Rhino is that you can’t be sure of the order of global variable initialization. Personally, this is not an issue for me, as I avoid […]

apps script v8
Apps Script & Java Script

Qottle recipe: Managing asynchronous queues with duplicates

Qottle recipe for managing asynchronous queues with duplicates Qottle is a queue for asynchronous tasks with prioritization, ratelimit, and concurrency support. It can also detect and reject duplicate requests. This recipe shows an example of […]

apps script v8
Apps Script & Java Script

Qottle recipe: How to manage an asynchronous polling queue

  Qottle is a queue for asynchronous tasks with prioritization, ratelimit, and concurrency support. This recipe shows an example of a qottle queue for continuous, controlled polling. Qottle recipe for polling You can use qottle […]

Apps Script & Java Script

Goa v8 changes and enhancements

v8 and other htmlservice changes meant I had to make a few small changes to cGoa. The good news it’s easier to use than ever, and supports a few new services too. It’s best to look at the service list on github, as that’ll be kept up to date. Here’s a reminder of how to use it.  […]

apps script v8
Apps Script v8

Apps Script V8: Arraybuffers and Typed arrays

Apps Script V8 implements ArrayBuffers and Typed arrays from ES6. If you’ve used Apps Script Crypto Utilities or done any work with Blobs, then this is what’s going on behind the scenes, now exposed as […]

apps script v8
Apps Script v8

Apps Script V8: Maps and Sets

Apps Script V8 implements a couple of useful new ES6 structures – Maps and Sets. Here’s what they are and how to use them Maps and Sets: What are they? These are a collection of […]

apps script v8
Apps Script v8

Apps Script V8: Template literals

V8 adds template literals from  JavaScript ES6. Template literals: What are they? It’s a shorthand way of using a template into which variables are substituted in a string. This allows for better reuse of string […]

apps script v8
Apps Script v8

Apps Script V8: spreading and destructuring

Apps Script V8 adds destructuring from  JavaScript ES6. Legacy Apps Script already had destructuring of arrays added fairly recently, but v8 gives full a destructuring capability. Destructuring: What is it? It’s a way of plucking […]

apps script v8
Apps Script v8

JavaScript V8 Arrow functions, this and that

Function declarations versus arrow functions JavaScript V8 adds the arrow function declarator from modern JavaScript. This is a handy shorthand but it’s more than just that. There are some behavioral differences too that you’ll need […]

apps script v8
Apps Script v8

JavaScript V8 variable scopes

var, const and let One of the key things that V8 has sorted out is the scope of variables. Using var to declare variables meant that anything declared within the scope of a function could […]

apps script v8
Apps Script

Apps Script v8

Apps script now supports JavaScript ES6 Apps Script V8 now supports the same modern JavaScript you can use when writing for the browser. Up until now, you had to write in a dialect of JavaScript-based […]

No Picture
Apps Script & Java Script

Setting up blister lists

In Using blister custom functions I showed examples of how to lookup scriptDB lists as custom functions.  Here’s how to create lists. In each case, to access lists in your sheet you need to add a reference […]

No Picture
Apps Script & Java Script

Blister validation code

Here is the code for each of the example mentioned in GAS lists and validation. The custom functions You need this in your local workbook. You can find it in the examples sheet. These are the custom […]

No Picture
Apps Script & Java Script

Using blister custom functions

Examples Let’s take an example. Say you are a small garage, with a stock list of cars and you work exclusively with spreadsheets. You don’t want to take copies of the list, but you want […]

No Picture
Apps Script & Java Script

Blister custom functions

The custom functions These are the custom functions you can call directly from your sheets. The function documentation is here and you can find examples of use in Using blister custom functions and you’ll need the code described in Blister […]

No Picture
Apps Script & Java Script

GAS lists and validation

It’s very common to want to lookup some list, or apply them as validation to data entry when playing around with Spreadsheets. Between them, a search for Spreadsheet related VLOOKUP, INDEX and MATCH return 30 […]

Apps Script & Java Script

Easy reference for published scripts

It would be useful to keep a reference guide to all projects and libraries shared on github, and their IDS. If you are using gasgit, then we already have everything needed to make that as […]

Apps Script & Java Script

Measuring sheet operation performance

Looking into how various operations perform as the size of the sheet increase provided some interesting data. The objective is to see whether the time to execute particular operations is directly proportional to the size […]

Apps Script & Java Script

Performance

All about performance analysis, tips and tricks for getting the best out of both Apps Script and Excel. […]

No Picture
Apps Script & Java Script

scriptDb JavaScript api examples

The JavaScript client is very similar to A VBA API for scriptDB, so reading that will give you a more detailed flavor of what can be done. The implementation is very different though, and there are […]

Apps Script & Java Script

Testing the API

This is a ScriptDB API for JavaScript. The tests that are referred to in scriptDB API for JavaScript are implemented in https://storage.googleapis.com/toasty/t/gas/scriptdbapi.html. Code is below <!DOCTYPE html> <html> <head> <meta charset=”utf-8″ /> <title>scriptDB data input – ramblings.mcpher.com</title> <link […]

No Picture
Apps Script & Java Script

scriptdbcom implementation

Here is the javascript implementation for the scriptDB API. It needs jQuery. * methodType = “GET”; */ var dataType = “json”; if(!postData) { u += “&callback=?”; dataType = “jsonp”; } var d = $.Deferred(); var […]

Apps Script & Java Script

Authenticating scriptDb JavaScript API

As per this blog post, Google Apps Script does not support CORS (cross origin resource sharing) to allow access from cross domain client apps. The API uses JSONP for GET requests to get over this, but […]

Apps Script & Java Script

cParseCom implementation

I use scriptDB a lot , both with Google Apps Script and from other sources, including VBA, and in this blog post, I  compare parse.com performance with script DB. One of the things that Parse.com has going […]

Apps Script & Java Script

Some simple examples

Because the GAS API is so similar to parse.com – nosql database for VBA, you may want to read that too, which has similar examples. Note that virtually all methods can be chained leading to pretty […]

Apps Script & Java Script

creating Parse Classes from Google Spreadsheets

Just as in parse.com – nosql database for VBA, you’ll probably want to load up some test data from a Google Spreadsheet to a Parse.com class.  You’ll find some test data in this workbook – it’s same data […]

Apps Script & Java Script

The Orchestration namespace

Take a moment to read these if this is a new topic for you. Orchestration of Apps Scripts – parallel threads and defeating quotas Jobs, work, stages, threads and chunks Namespaces and App structure Creating […]

No Picture
Apps Script & Java Script

Creating a work package

Take a moment to read these if this is a new topic for you. Orchestration of Apps Scripts – parallel threads and defeating quotas Jobs, work, stages, threads and chunks Namespaces and App structure Code […]

No Picture
Apps Script & Java Script

Namespaces and App structure

Take a moment to read these if this is a new topic for you. Orchestration of Apps Scripts – parallel threads and defeating quotas Jobs, work, stages, threads and chunks Code is on github GasThreader structure […]

No Picture
Apps Script & Java Script

Jobs, work, stages, threads and chunks

Before getting started on how to set up Orchestration of Apps Scripts – parallel threads and defeating quotas let’s get a few definitions clarified. Code is on github This dashboard will provide the reference point for each of […]

Apps Script & Java Script

Goa in a sidebar

This describes how to implement goa in a sidebar. The example will assume that the authorization process should be repeated for each new user (like a web app published in Accessing as the user running the […]

Apps Script & Java Script

Getting and using the token

This describes how to get and access token from the Goa library as described in Oauth2 for Apps Script in a few lines of code (which you should read first for background). If you have initialized the […]

Apps Script & Java Script

How OAuth2 works and Goa implementation

Oauth2 for Apps Script in a few lines of code (which you should read first for background) has many pages of videos and tutorials about different OAuth2 scenarios for Apps Script and is used daily in […]

Apps Script & Java Script

How to customize the consent screen

This describes how to customize a consent screen using the Goa library as described in Oauth2 for Apps Script in a few lines of code (which you should read first for background). What is a consent screen […]

Apps Script & Java Script

Setting an alternative ontoken callback

This describes how to authenticate with Podio using Goa, as described in Oauth2 for Apps Script in a few lines of code (which you should read first for background). The library, cGoa, is available under this project […]

No Picture
Apps Script & Java Script

Unnesting data to sheet values

This is an Apps Script version of the code referred to in Flattening arrays for Elastic Search. The point of that article is to prepare data arriving from GraphQL for elastic search, but it also solves […]

Apps Script & Java Script

Using Google Earth

javaScript: Flying around and asynchronicity in google Earth This relates to Data Driven Mapping applications and the Javascript HowTo section Google Earth Api You will find tons of content on Google Earth , most of which is described […]

Apps Script & Java Script

Using Google Visualization DataViews

javaScript: creating google visualization Data Views This relates to Data Driven Mapping applications and the Javascript ‘HowTo’ section Google Visualization dataViews As mentioned in Using Google Visualization DataTables a master google DataTable is created for all data in […]

No Picture
Apps Script & Java Script

Using Google Visualization DataTables

javaScript:creating google visualization DataTables This relates to Data Driven Mapping applications and the Javascript HowTo section Google Visualization Tables I have covered Google Visualization in various forms with an ‘Excel slant’ on this site. Let’s take a look […]

No Picture
Apps Script & Java Script

Providing VizMap Data without Excel

VizMap: the data javaScript This relates to Data Driven Mapping applications For this example I had created a  Concerts/Venues example that is now deprecated. The complete workbook (googlemapping.xlsm) can be downloaded (above) and the example Parameter WorkSheet is […]

Apps Script & Java Script

Creating VizMap framework without Excel

VizMap: the framework javascript This relates to Data Driven Mapping applications For this example I had created a  Concerts/Venues example that is now deprecated. The complete workbook (googlemapping.xlsm) can be downloaded (above) and the example Parameter WorkSheet is […]

Apps Script & Java Script

VizMap Application Filename

VizMap: the Viz Html parameter Block This relates to Data Driven Mapping applications This parameter block is handled by cDataSet classes and is used to define the filename of the to be generated application. It also contains customization […]

Sheets specific

cOauth2 class implementation

In Google Oauth2 VBA authentication I showed how to use this class. All associated libraries are available in the cDataSet.xlsm library downloadable here, or through gistthat, as described here. You’ll need the cRest module. Examples […]

Apps Script & Java Script

VBA and jsdoc

For an overview of what VbaGit is, please read Integrate VBA with Github. If you are working with Google Apps Script as well as VBA, then you will probably be familiar with JDSOC. This is a way […]

Apps Script & Java Script

Getting started with VbaGit

For an overview of what VbaGit is, please read Integrate VBA with Github. Getting the code You can get the code from github or you can get a premade bootstrap workbook from the github stuff section in the  downloads […]