AppsScriptPulse

Write Google Apps Scripts using Modern JavaScript ES6 – Digital Inspiration

Google Apps Script has made the switch to Chrome V8 JavaScript Engine. You can now write your Google Scripts and GSuite addons directly in ES6 but with a few caveats.

Great overview from Amit Agarwal on some of the changes in the Google Apps Script runtime. Amit provides some very useful tips for things you can and can’t do using V8 as well as listing some resources if you are interested in learning about what’s possible now that you can use Arrow Functions, Classes, Array Destructuring, Template Literals and more.

Source: Write Google Scripts using Modern JavaScript ES6 – Digital Inspiration

trigger automated meeting invite reminders using apps script

send a follow-up email to all undecided participants of a meeting that you’ve scheduled via google calendar using apps script.

here’s a piece of code that you could schedule for every morning (preferably before your official work hours start) to be triggered, such that the script could iterate through every single meeting event that you’ve scheduled (i.e. where you’re the “organiser”) for the day and send an email to all those invitees who’ve neither accepted nor declined (even excluding the maybe’d ones too) to said invites.

Nice post from Sourabh Choraria which covers interacting and using data from your Google Calendar.

Source: trigger automated meeting invite reminders using apps script

Google Apps Script Library Database

Photo by Markus Spiske on Unsplash

Photo by Markus Spiske on Unsplash

Andrew Roberts (@andrewroberts6) is creating a massive database which records information about Apps Script libraries that are publicly available. He includes the name, a short description, project key, and other helpful information (links, last updated, etc) for finding helpful libraries.

Source: Google Apps Script Library Database – Google Sheets

Benchmark: Loop for Array Processing using Google Apps Script with V8

Benchmark: Loop for Array Processing using Google Apps Script with V8 – submit.md

Kanshi Tanaike has published some useful benchmarks looking at the process time for various loop methods comparing the old Google Apps Script runtime with V8. Something to keep in mind that while there are performance improvements there is a cost as calls to G Suite services:

Source: Benchmark: Loop for Array Processing using Google Apps Script with V8

Creating a Slackbot to Scan Google Ads URLs for Errors

As an agency dealing with tens of thousands of URLs, it’s inevitable that some of them are going to break without our knowledge.

Not only does sending traffic to a broken link waste ad spend, it also leads to a poor experience for the user. Redirecting links can also strip out tracking code, preventing us from accurately seeing the impact of our activity. In order to mitigate this, we’ve set up a Google Apps Script to automatically scan all active ads in our MCC account and send a notification to Slack (or via email) whenever it detects a problem.

Source: Creating a Slackbot to Scan Google Ads URLs for Errors

How to Force Reset GSuite Users’ Passwords with Apps Script – Digital Inspiration

Learn how the GSuite admin can change the Google account passwords of multiple users in their organization automatically with Google Apps Script.

You can use Google Apps Script to automatically reset the password of users in your GSuite domain. This script can only be executed under the Suite admin account. You also need to enable the AdminDirectory Advanced Service in your Apps Script Editor.

Source: How to Force Reset GSuite Users’ Passwords with Apps Script – Digital Inspiration

TeslaGAS is a Google Apps Script library that helps writing scripts for your Tesla car

Photo by Afif Kusuma on Unsplash

Photo by Afif Kusuma on Unsplash

TeslaGAS is a library that helps writing scripts that communicate with your Tesla – Zzapps/teslagas

Riël Notermans from Zzapps has published the beginnings of a nice little Google Apps Script library that you can use to communicate with your Tesla car.

Source: Zzapps/teslagas

Unit Testing in GAS Part 5: Testing Objects and Arrays

It’s time to dive into deeper equality situations with objects and arrays. Every test we’ve written so far has used a non-strict comparison. In other words, we’ve only been checking value but not type. This is particularly important in JavaScript because of how it handles truthy and falsy values.

The fifth part of a series using the GAS QUnit library to write unit tests for Apps Script projects in the web editor. This post details testing arrays and objects.

Source: Unit Testing in GAS Part 5: Testing Objects and Arrays

Automate Adding Members to Google Group from Google Sheets — Google Apps Script

I added a script to Google Sheets that auto added new email addresses to the Google Group every time the sheet was edited.

The author was using Google Group to provide access to their dashboard in Google Data Studio. The members kept adding and the process became tedious. They were already keeping/adding all emails in a Google Sheet for some mapping. So this is what they did.

Source: Automate Adding Members to Google Group from Google Sheets — Google Apps Script

ES 6 Features for Google Apps Script: Template Literals – Jeff Everhart

In this post, I look at using template literals, an ES6 feature now available to Google Apps Script developers, to create dynamic multiline strings.

Source: ES 6 Features for Google Apps Script: Template Literals – Jeff Everhart

Subscribe to Apps Script Pulse...