The ULTIMATE Guide to NPM Modules in Google Apps Script
Featured

The ULTIMATE Guide to NPM Modules in Google Apps Script

Google Apps Script has some amazing built-in stuff. It gives us native access to all Google apps like Sheets and Gmail, seamlessly integrates with GCP services like BigQuery, allows for the building of interfaces with HTML and CardService, facilitates the creation of simple webhooks/APIs and web apps with simple and efficient client-server communication, can make use of any API through UrlFetchApp, and can be bundled into add-ons for efficient distribution. In my experience, it’s enough for 99% of all Google Apps Script developers.

However, one thing that Google Apps Script is missing is modules.

Latest

How I Programmed the Game of Life in a Google Sheet with Google Apps Script

How I Programmed the Game of Life in a Google Sheet with Google Apps Script

According to Wikipedia, the Game of Life “is a cellular automaton devised by the British mathematician John Horton Conway in 1970.”

Read
How to Build an API Wrapper in Google Apps Script

How to Build an API Wrapper in Google Apps Script

Every developer at some point needs to make use of an external service to extend their code. APIs are built with this purpose in mind; they allow us to communicate with other services and applications over HTTP in a standardized way.

Read
How to Write Google Apps Script Code Locally in VS Code and Deploy It With clasp

How to Write Google Apps Script Code Locally in VS Code and Deploy It With clasp

You get all the functionality of the online IDE and much more more: autocomplete, custom themes, installation of modules, linting, snippets, etc.

Read
How to Use Service Accounts and OAuth2 in Google Apps Script

How to Use Service Accounts and OAuth2 in Google Apps Script

In 99% of all cases, authorizations in Google Apps Script are extremely straightforward. When a user executes their script, they run it as themselves with their respective authorization scopes. However, what if you need to give more rights to your app beyond what your intended users will have?

Read
How to Build Custom Functions in Google Sheets with Google Apps Script

How to Build Custom Functions in Google Sheets with Google Apps Script

If you use any kind of spreadsheet, you know that they contain built-in functions that help you work with your data. For example, the function SUM(A1:A5) will print the sum of the values in the first five rows of the first column. But what if you need a function that your spreadsheet doesn’t have? That’s where the custom functions come in: in Google Sheets you can write your own ones with Google Apps Script.

Read
Bypassing the Maximum Script Runtime in Google Apps Script

Bypassing the Maximum Script Runtime in Google Apps Script

Google Apps Script is an amazing language that can automate a lot of your work. However, working with GAS also means that you have to learn to live with its built-in limitations and quotas. One such quota is the total script runtime. It’s limited to six minutes on free accounts and thirty minutes on corporate accounts.

Read
Tracking Google Sheet Opens with Google Apps Script

Tracking Google Sheet Opens with Google Apps Script

The basic principle behind tracking Google Sheet opens is the same as the one behind email tracking with a transparent pixel. In a Google Sheet, we will use the IMAGE()function, which will call a deployed Google Apps Script web app URL with some parameters in the query string.

Read
Taking Away the Pain From Unit Testing in Google Apps Script

Taking Away the Pain From Unit Testing in Google Apps Script

There are numerous libraries that exist for unit testing in JavaScript, including Jest and Mocha; however, they aren’t necessarily well-adapted to run under the Google Apps Script environment. A few solutions do exist for GAS, but they’re nothing crazy either.

Read
Using Design Patterns in Google Apps Script

Using Design Patterns in Google Apps Script

A lot of users try and quickly learn GAS and use it to make their lives easier. It’s all great, however the code we sometimes tend to come across on StackOverflow and other sites lacks best practices, hence I thought it was time to start bringing them up and I will start today with design patterns.

Read
Schedule a meeting