AppsScriptPulse

Creating and using a settings section in Google Sheets for your Apps Script projects

 

Image credit: Dimitris Paxinos

Create a reusable settings page in Google Sheets, using Apps Script, where configurations are easily accessible, even to those without a coding background.

I’ve not seen the numbers but would imagine the majority of Google Apps Script projects are script bound to Google Sheets. Google Sheets provide a useful data canvas which is familiar to users, which can also be used to quickly interface your script solutions. You could of course use dialogs and sidebars combined with the Properties Service to collect and store settings, but coding these in HTML/JavaScript can be time consuming.

This post from Dimitris Paxinos includes a nice Apps Script code pattern for getting and setting user settings from a Google Sheets tab. This includes some nice features including in memory storage and methods to use Script Properties. The post includes an accompanying video which explains the code should you need additional help understanding this solution.

Source: Creating a Settings Section in Google Sheets Apps Script Projects

Bringing JSON Data from an API into Looker Studio with Google Apps Script

Learn how to seamlessly integrate JSON data from an API into Looker Studio using a custom connector built with Google Apps Script.

This post is a useful reminder of that Google Apps Script can be used to make a data connector for Google online visualisation and reporting tool, Looker Studio. The post by Dimitris Paxinos covers all you need to know about integrating a third-party API as a data source, exposing configuration settings and deploying the connector. All the code is on Github and is a great boilerplate if you have other APIs you are interested in integrating.

Source: Bringing JSON Data from an API into Looker Studio

Autofill Google Sheet formula each day with Google Apps Script

Check a Google Sheet once per day and if the date is in the past Autofill another row of formulas.

Example screenshot of a Google Sheet with columns and dates that are used to perform calculations.

Autofill Google Sheet formulas each day

The following Google Apps Script is designed to check a Google Sheet once per day and if the date is in the past it Autofills another row with the existing formulas used across the columns. This post is a variation of the Autofill Google Sheet Formula one.

Source: The Gift of Script: Autofill Google Sheet Formula each day

Automatically save attachments for a Google Google to Google Drive using Gmail and Google Apps Script

 

Imagine you’re managing a Google Group, where important attachments are regularly sent. Manually saving these attachments to your Google Drive can be time-consuming and prone to errors. Is there a way to automate this process and ensure that you don’t miss any crucial documents?

It’s quite easy to tie yourself in knots when it comes to scheduling tasks in Google Apps Script to handle data created since the last run. This Medium post from Pablo Pallocchi shows a nice way your can structure Gmail searches using the after: operator combined with a ‘last execution date’ stored in Apps Script Properties Service. The result is a nice solution design to backup attachments sent to a Google Group to Google Drive. There’s lots of scope for extending and/or modifying this solution. All the details are in the source post.

Source: Automatically Save Email Attachments to Google Drive Using Google Apps Script

A Google Workspace Developer’s notes on publishing a Google Workspace Add-on to the Marketplace

 

This guide will walk you through creating a public Google Workspace Add-on, and launching it in the Google Workspace Marketplace for as free as possible. …

I’d never developed or published an add-on before. As I was looking into it, I realized that, while it is not super complicated, it is not readily obvious — especially for anyone just getting into add-on development. Google does have a guide on developing and publishing an add-on but it leaves a lot of unanswered questions.

So I thought I would put together what I learned in this guide — a playbook for anyone else who wants to develop their own add-on.

Following on from a recent Pulse post on How to publish to the Google Workspace Marketplace published by the Google Workspace team, here’s a developer’s take on the process from start to finish. As mentioned in the post the official support resources should be your start point, but these notes spotlight some of the nuances required to publish an add-on and the appendix includes some tips on naming your add-on and where/how to host required documentation including your add-on privacy policy.

Source: Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace

How to publish to the Google Workspace Marketplace [Video Tutorial]

In this video you will find out how you can publish your app to the Google Workspace Marketplace.

Publishing a Google Workspace Add-on or Chat App can be a bit daunting. We’ve feature a couple of ‘how-to’ guides, which go into the detailed steps of the process, and my favourite has to be Alice Keeler’s top tips for getting your Google Workspace Add-on published. If you are still unsure about the Google Workspace Marketplace publication options and information required this video from Chanel Greco gives an overview of the entire process from start to finish.

Source: How to publish to the Google Workspace Marketplace

What can AI do for you as a Google Sheets user? Is the hype justified?

Image credit: Dall-E/ Ben Collins

See how AI tools work with Google Sheets to boost your productivity. Covers ChatGPT, Google Bard, and AI add-ons.

A very informative post from Ben Collins, discussing how AI can be used to automate tasks, identify patterns, and make predictions in the context of Google Sheets. Ben provides several examples of how Generative AI can be used to improve the way you can interact with data in spreadsheets from helping with formula to generating and improving data.

As Ben points out in the post users have benefited from AI in Google Sheets for a number of years with features like Explore. Perhaps the biggest recent change is exposing Large Language Models as a service, with users able to directly access the ‘prompt’ to generate output.

Source: AI + Google Sheets: How To Use Them Together

Getting started with Google’s Gen AI (PaLM 2) in Google Apps Script

At the Google I/O ’23, various announcements were made with respect to different AI and ML advancements Google is making as we speak. While listening to the session, I stumbled on PaLM 2. It was really interesting as to what capabilities it has with respect to generative models and machine learning.

This tutorial series will introduce you to PaLM 2, the API, MakerSuite, and Google Apps Script. We will combine these tools to do something interesting with prompts.

Editor: There are a couple of ways you can access Google’s Gen AI language models. Bard is the consumer version but for developers you might want to start exploring API access to one of the underlying foundation language model, PaLM 2, using Google’s MakerSuite. There is a waitlist for MakerSuite, but worth putting your name down if you are interested in an easy way to programmatically start prototyping applications with the PaLM using a basic API key. This video series from Aryan Irani covers everything you need to get started, particularly if you are interested in using PaLM with Google Apps Script.

If you prefer to get started straight away, you can also access the PaLM API in Vertex AI today from a Google Cloud project (more information about this on the MakerSuite site).

Source: Getting started with PaLM 2

How to transcribe audio and video files from Google Drive with Google Apps Script

Learn how to automatically transcribe audio and video files in Gmail messages with the help of OpenAI speech recognition API and Google Apps Script

Amit Agarwal highlights a no-code solution for transcribing audio in Gmail attachments available in his ‘Save Gmail to Google Drive’ Google Sheets Add-on. As part of this he shares the code and tips for transcribing audio files using OpenAI’s Whisper API. When you look at the snippet provided you’ll see once the audio file is in Google Drive it is very easy to use the Whisper API to get a transcript.

Text-to-speech services aren’t new, but approaches and larger training datasets are improving accuracy and if you prefer to work in the Google ecosystem you can find out more about Cloud Speech-to-Text.

Source: How to Transcribe Audio and Video Attachments in Gmail – Digital Inspiration

Bulk duplicate Google Drive files using Google Apps Script

The following Google Apps Script tool is designed to take a single Google Drive file e.g. a Doc / Sheet / Slide and make duplicates/copies of it with unique file names. The tool will also create a clickable link within the Google Sheet to each new file copy.

Screenshot of the tool for duplicating Drive files

Screenshot of the tool for duplicating Drive files

Source: The Gift of Script: Bulk duplicate Google Drive files