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 […]

No Picture
Apps Script Specific

What JavaScript engine is Apps Script running on?

Writing Apps Script const scoping problems led to me to wonder how to get exactly which  JavaScript features are supported by Apps Script and which are not. By deduction, it seems likely that the current version of […]

No Picture
Apps Script Specific

Apps Script const scoping problems

Apps Script is based on ES3 JavaScript, with quite a few additions from ES5 and even ES6. In this article we’ll take a look at the implementation of const, and let which were introduced in […]

No Picture
Apps Script Specific

Using Es6 with Apps Script

At the time of writing, the Apps Script JavaScript engine is based on ES3 with a few useful ES5 things added. Much of the rest of the world is at Es6 with Es7 coming along. […]

Apps Script Specific

Simple server side polling

As you know, there isn’t a builtin way to get notified about changes in a host Document from a client-side App. Ideally, there should be some kind of trigger that can be invoked when the […]

No Picture
Apps Script Specific

Logging differences in strings in Apps Script

It can be hard to notice where two strings are different in the Apps Script logger. We can borrow JsDiff to help with that. I’ll be using the cjsDiff library M9zcCXivXIkjpW_mA_X1Vtiz3TLx7pV4j You can report on […]

No Picture
Apps Script Specific

Identify duplicates on Drive

Identify Duplicates on Google Drive The problem with Drive is that it’s really easy to have loads of files with the same name spread around in multiple folders on Drive. Here’s how to get a […]

No Picture
Apps Script Specific

Counting script and library usage

One of the problems of measuring script or library usage is the identification of returning users. As you know email addresses or some other identification is not easily accessible (rightly so), and neither should it […]

No Picture
Apps Script Specific

From Xml to JSON

In Convert JSON to XML I showed how to make XML from JSON. Here’s the opposite. It could be a little more all-encompassing by dealing with dates, and unescaping, but for now, this should serve […]

No Picture
Apps Script Specific

Convert JSON to XML

There are a few examples of XML to JSON conversion around, but not so many going the other way. In case you need to convert Apps Script objects to XML, here’s a snippet to do […]

No Picture
Apps Script Specific

Including the stack in custom errors

If you throw a custom error, it can be hard to track down where it came from if you’re using a common function. In Reporting file, function and line number in Apps Script I showed […]

No Picture
Apps Script Specific

Why Base64

In this article we’ll take a look at Base64, what it is and why we use it. Although there are Base64 encoding and decoding available in the Apps Script Utilities service, we’ll write an encoder […]

No Picture
Apps Script Specific

Transform dates for add-on transfer

If you getValues from a spreadsheet, and those values contain dates, and you expect to be able to send them to an add-on, then you’ll find you get an error about unsupported data types. This […]

No Picture
Apps Script Specific

Serving apps script to JavaScript app

Here’s an interesting idea. Let’s say you want to use Google Apps Script as the master for a library of functions (since you can’t use script tags in apps script) that you would like to […]

No Picture
Apps Script Specific

Apps for Office – binding example comparison

This page is still being written. In Pseudo binding in HTML service I showed how to simulate Sheets cell binding in an Apps Script Add-on. Office for apps includes binding out of the box. We’ll use that […]

No Picture
Apps Script Specific

Cross Origin Resource sharing (CORS)

What is CORS In summary it’s a way of securely enabling a client side app to exchange data with a server that is not in the same domain – which is of course against cross […]

No Picture
Apps Script Specific

Proxy jsonp

If you are reading this, I guess you are familiar with this error message XMLHttpRequest cannot load http://dl.dropbox.com/u/14196218/Share/somedata.json. Origin null is not allowed by Access-Control-Allow-Origin. This is of course the same origin policy that prevents you being […]

Apps Script Specific

Migrating from Parse.com to MongoDB

You probably read the announcement that Parse.com is closing its hosting service. This is probably a good time to look at firebase, but if you are using my dbabstraction library, you can change to some other backend […]

No Picture
Apps Script Specific

Backing off on rate limiting

There are many rates and quotas in the Google Apps Script environment. One of the usual ways of dealing with it is to sleep between instructions, but that seems to be a rather blunt instrument. […]

Apps Script & Java Script

Complete Apps Script Applications

I’ve found that I have completed applications lying around the site, with no good way of finding them. I’m starting this section to walk through complete Apps Script Applications, which cover a number of concepts. […]

Apps Script & Java Script

Google Apps Script snippets

There are many Google Apps Script projects and snippets scattered around this site. I’m going to try to organize them in this page, but it will take a while. If you find something on the […]

No Picture
Apps Script & Java Script

Google Caching and faking jsonp

In using Google Apps Script as a jSONP proxy, I covered how you could use GAS to get over javaScript same domain restrictions. If you need to access jSon data from javaScript, jQuery and so […]