AppsScriptPulse

Google Workspace Developers ‘ask me anything’ and the future of Apps Script #AppsScriptAMA

The Google Workspace DevRel team have recently kicked off an ‘ask me anything’ #AppsScriptAMA campaign on Twitter:

You can find recent questions/answers using this Twitter search. There was one answer that caught my eye from @mtfan about the future of Google Apps Script:

The YouTube short response doesn’t give much away in terms of big feature updates, but the long waited Apps Script project version control sounds like it might be arriving soon.

Google Drive folder picker using jsTree with Google Apps Script and Javascript

This is a sample script for the folder picker using jsTree with Google Apps Script and Javascript.

The Google Picker is a file picker that allows users to select files from Google Drive which can be used in your Apps Script projects (See Using Google Picker with Google Apps Script). The Picker is good but there are certain scenarios where the functionality isn’t available, one I’ve personally found is selecting the My Drive or Shared drive root. Here’s an alternative approach from Kanshi Tanaike for an alternative folder picker created using jsTree. In the post you’ll find more information plus how you can use this solution with a service account.

Source: Folder Picker using jsTree with Google Apps Script and Javascript

Build your first AppSheet app: How I built a food tracker (with AppSheet Databases)

I keep forgetting what I have in the freezer. At first I used Google Sheets to keep track of it, but I wanted something that was easy to consult and update on my smartphone. So I turned to AppSheet! Here’s a tutorial to follow to make a similar tracking solution.

This post on the Google Developers blog covers the basic steps for creating an AppSheet app using AppSheet Databases, which are currently in public preview. I’ve recently also been having a play with AppSheet Databases, and I’ve been impressed with the improved performance whilst also keeping them simple to use. I’ve encountered a some issues when setting up columns as references so not ready for prime time yet. Projects like the one mentioned in this post are a great way to ‘kick the tyres’ and experience yourself.

Source: Build your first AppSheet app: how I built a food tracker

Google Apps Script Patterns: Keeping a gam generated users report up-to-date with Google Apps Script

In Google Workspace gam is probably the ‘go to’ tool command line tool which allows administrators to easily manage domain and user settings. Recently I was asked about how you can keep gam generated reports up-to-date using Google Apps Script. It’s worth remember that gam uses public Google Workspace APIs when it performs actions and reports. In this post I show you a pattern for building script to keep gam reports fresh.

Source: Google Apps Script Patterns: Keeping a gam generated users report up-to-date with Google Apps Script

Introducing AppSheetApp: A Google Apps Script library/helper class for the AppSheet API

AppSheet is headlined as a no-code platform but this doesn’t mean for developers there aren’t coding opportunities. In this post I’ll be sharing AppSheetApp, a Google Apps Script helper library we’ve made at CTS which makes it easy to use the AppSheet API in your own AppSheet apps. As part of this I’ll highlight how this library has made our AppSheet powered Grab n Go Chromebook loaner solution immediately scalable and data source agnostic.

In this post the worlds of AppSheet and Apps Script collide, the resulting fusion is a library which makes it easier to integrate external data and events into your AppSheet app. This solution hopefully makes it a lot easier for developers and low coders to do more with AppSheet creating the possibility to use one (or a couple) of lines of code to interact with your app and not worry which data source your app is using. This post has more details of how you can get started and an example of the impact its already making with an alternative Grab n Go Chromebook loaner solution I’ve been part of at CTS.

Source: Introducing AppSheetApp: A Google Apps Script library/helper class for the AppSheet API

Register for an online AppSheet ‘no-code’ along with Tim McLardy and Martin Hawksey 3-5 May, 2023

Did you know? We’re offering 20% off registrations for our FIRST public AppSheet no-code-along! ⭐️

With AppSheet, you can simplify business processes without ever needing to write a single line of code. This can help you out if you have users managing data on mobile devices, getting lost in spreadsheets, or even still using pen and paper!

Our two part course will include hands-on experience of building a simple app alongside our in-house expert Martin Hawksey as well as covering all the basics you need to get your creative juices flowing!

Don’t sleep on it, this offer is only available until the end of March. Sign up today to secure your discount

If you are still unsure where to start with Google’s no/low code platform, AppSheet, on 3 + 5 May I’ll be joining Tim McLardy to help you get started on your journey as part of our two part ‘no-code along’. There is a discount if you register in March and Tim and I will be working extra hard to make sure you get the most out of the session.

Source: AppSheet No-Code-Along

Performance report for CacheService versus SpreadsheetApp for read/write in Google Apps Script

Image credit: Ignacio Lopezosa Serrano

For read-heavy applications that don’t involve components external to Apps Script accessing the cache and don’t exceed the CacheService limits, use CacheService. For write-heavy applications or for when some external parts require access to the same cache, use Spreadsheet App.

An interesting report from Ignacio Lopezosa Serrano on the relative performance of CacheService and SpreadsheetApp for reading/writing data with Google Apps Script. Some surprising results and something I think to be kept in mind is how these tests compare to ‘real world’ conditions. As also pointed out in the post there are some  service limitations of CacheService to keep in mind particularly around storage size limits.

Source: The use of Caches in Google Apps Script

Rearranging column order in Google Sheets using Google Apps Script

This is a sample script for rearranging columns on Google Spreadsheet using Google Apps Script.

Following on from the recent example from Scott Donald on How to sort tabs in Google Sheets with Google Apps Script, here is a handy little snippet from Kanshi Tanaike for changing the column order in Google Sheets using Apps Script and the moveColumns method.

Source: Rearranging Columns on Google Spreadsheet using Google Apps Script

Efficiently exporting mulitple Google Docs files in PDF format with batch requests and Google Apps Script

This is a sample script for exporting Google Docs files (Spreadsheets, Documents, and so on) in PDF format with batch requests using Google Apps Script.

As a reference sample situation, in order to export 100 Google Document files as PDF files, when I tested this sample script, the processing time was about 150 seconds and no error occurred. And, I confirmed that 100 valid PDF files were created in my Google Drive.

Kanshi Tanaike has been busy again, this time looking at how you can handle batch exports from Google Docs, Sheets and Slides using Google Apps Script. There is quite a bit of engineering to get your head around but if you are looking for a copy/paste solution everything is well commented for you to drop this code into your own project. If you’d like more context about the solution there is a related post on Stack Overflow.

Source: Exporting Google Docs Files in PDF format with Batch Requests using Google Apps Script

How to sort tabs in Google Sheets with Google Apps Script

 

Learn how to sort Google Sheet tabs in ascending and descending order with Google Apps Script Magic. Code and video inside!

Latest from Scott Donald, this time Scott is looking at Google Sheets tab sorting with Google Apps Script. Hepefully something for everyone in this post and for me it was learning about JavaScript’s Intl.Collator(), which allows language sensitive string comparisons.

Source: How to Sort Tabs in Google Sheets with Google Apps Script – Yagisanatode