AppsScriptPulse

Structure and simplify your Google Apps Script (with) V8

Apps Script now supports the V8 runtime. Time for an update to the story “Structure and simplify your Google Apps Script Apps script”. The V8 runtime brings modern ECMAScript syntax to Apps Script. So we can now use arrow functions and destructuring assignments. No more hoisting with let and const and my personal favorite, template literals.

In this story Jasper Duizendstra shows the added value of the changes made in the constructor pattern using the factory functions. It also shows how to implement chaining and a builder pattern in Apps Script.

Source: Structure and simplify your Google Apps Script (with) V8

Building a Gmail Add-on with Apps Script

I recently sent an email where I typed code inline in the message body. I spent a good 15 minutes going through and formatting each line of code to look like, well, code. I wanted an extension like Code Blocks that would instantly format my text to a specific preset style.

A well chronicled article by Kelsey Kripp on how to dive right into Apps Script for G Suite to build your own Gmail add on!

Source: Building a Gmail Add-on with Apps Script

Fast, operational, and awesome prototypes with Google App Scripts and the Airtable API

As of writing Google App Scripts and functions in the code.gs documents use the V8 Runtime which generally supports ES6 syntax. This wasn’t true historically, and Google Scripts was limited ES5 syntax. This was a significant limitation. You’ll likely still find a lot of tutorials for Google App Scripts using ES5 and related workarounds, keep in mind there may be more modern ways to do the same thing now.

If your teams are using G Suite tools and Airtable, the building blocks to build secure and operational web application prototypes may be closer than you think. This article shows you how to get started and offer tips along the way.

Source: Fast, operational, and awesome prototypes with Google App Scripts and the Airtable API

Fake calling to leave one meeting for the next — Google Apps Script to the rescue

All through the day, I want call reminders for specific events 10 mins before the meeting time, so I can leave my current meeting with out a hitch and go for the next one. So I used 3 tools for this: Google Calendar to fetch meeting times, Google Calendar to fetch meetings. Twilio to make calls. And finally Google Apps Script to put it altogether.

An interesting implementation by Urwa Shabir on managing meeting schedule using Twilio, Google Calendar and Apps Script.

Source: Fake calling to leave one meeting for the next — Google Apps Script to the rescue

Marketing Data Extraction using SOAP API — Apps Script Automation

Recently I had setup a daily extraction automation from a marketing platform and they had SOAP API. I had worked with xml before, so after some trial and error I was able to fetch marketing data from trafficvance.com platform right inside Google Sheets

Nice post from Urwa Shabir highlighting how to interact with 3rd party APIs using SOAP which relies heavily on XML. The post covers formatting a SOAP request now that SOAPService is deprecated in Apps Script, as well as parsing the XML response.

Source: Marketing Data Extraction using SOAP API — Apps Script Automation

Hacking it: Generate PDFs from Google Forms

Some time ago, I had a request from one of my colleagues to help automate a rather repetitive and might I add, highly prone to error, process. One of the clients required her to fill in the same form several times in a day, manually, and then send it back for approval and signing. Of course, I’m simplifying a bit but that was what it was in essence.

In this detailed post, Neha demonstrates how to use Google Forms to generate professional looking PDFs from the data submitted via the form, using Google Sheets and Apps Script.

Source: Hacking it: Generate PDFs from Google Forms

Reliable, Secure & Scalable use of Google Apps Script | Google Developers Experts

Most conversations around solutions or automations created using Apps Script eventually get to a point where being able to address concerns around its reliability, security and scalability becomes a challenge — more so if compared to having similar applications being built on other platforms (say: AWS, GCP, Firebase etc.).

In this post, we’ll see how to navigate our way through said constructs by addressing parts of these problems and also explore ways in which we can bake some solutions right from the get-go!

In this post Sourabh Choraria provides some very useful answers for common questions organisations have when using Google Apps Script as part of their infrastructure. Points covered in this post include: managing concurrent executions; being able to securely store, access & manage API keys, tokens; and considerations around quotas.

Source: Reliable, Secure & Scalable use of Apps Script | Google Developers Experts

How to format cells through code in Google Sheets

If you had used the GUI to manage your custom formulas used for conditional formatting, then to see and manage that logic, you would have to find and select the correct cell, or select the entire spreadsheet, and then right click and select “Conditional Formatting”, or go to the menu and select “Format -> Conditional Formatting”, to actually see and edit that logic. Which can be quite inconvenient at times.

Set conditional formatting rules through your script, which would allow you to keep everything configured in a single script.

Source: How to format cells through code in Google Sheets

Grant access to resources 🚣 from a Google Sheet in G Suite

Use a Google Group to work cross-functionally with vendors, partners, customers, and volunteers outside of your domain, and scale access to work assignments and leverage security controls.

Share documents, events, and communications with users outside (or inside) your G Suite domain.

Source: Grant access to resources 🚣 from a Google Sheet in G Suite

Google Slides API — a deep dive on its powerful image manipulation methods

A post dedicated to devs and highlighting the power of the Slides API.

Use Google Apps Script and the Google Slides API to create a card game like Dobble.

Source: Google Slides API — a deep dive on its powerful image manipulation methods