AppsScriptPulse

How to use GCP service accounts with Google Apps Script projects to automate actions in G Suite

A Google Apps Script and Google Cloud Platform tutorial to learn how to use GCP Service Accounts to scale and protect automations

Examples of Google Apps Script being used in an enterprise setting tend to be few and far between which means this tutorial by Jeffrey Daube is an interesting insight to how script projects can be setup to serve the entire company. In particular, Jeffrey details how the use of service accounts can be used so that G Suite documents can be created with a non-human user allowing you to make calls to Google APIs without the usual authentication flow.

Source: How to use GCP service accounts with Google Apps Script projects to automate actions in G Suite

TSDynamicUrls (#1) — Leverage the URL Power of Google Docs, Sheets, Slides, Drawings & Forms 💥

In my previous post, I outlined the power of Google document URLs to perform “Simple, Powerful, Work” and promised to share several tools I’ve developed to aid in building them.

Source: TSDynamicUrls (#1) — Leverage the URL Power of Google Docs, Sheets, Slides, Drawings & Forms 💥

Making Google Forms and Spreadsheets a Bit Less Rigid Block Style – CogDogBlog

Here is how I learned to do some scripts to (a) use the WordPress API to dynamically populate some cells in a Google Spreadsheet; and (b) how to script a way to use these results to dynamically update text and menus in Google Forms.

A very comprehensive writeup of integrating Google Forms/Sheets and WordPress with Google Apps Script.

Source: Making Google Forms and Spreadsheets a Bit Less Rigid Block Style – CogDogBlog

Get The Last Response from a Google Form

Most of the time, when I write Google Scripts that address a Google Form, I almost always access the data through the spreadsheet of responses. But sometimes, getting back to the Form itself is necessary. In those cases, I use this code to access the final response. It’s not quite as simple as it seems.

The script below accesses the last response to a form, gets the email, timestamp, and answers and then adds them to a Google Sheet.

Source: Get The Last Response from a Google Form

Dynamically remove Google Form options

Screenshot of Google Form appointment slots
Google Form appointment slots

This was developed as I wanted to learn about removing Google Form option choices as part of exploring its capabilities for use with appointment slots. I am aware there are a number of Google add-ons that achieve this but they come with potential data protection issues when accessing your Google Account, hence an in-house approach.

The principle is simply that a user would select their desired appointment slot on the Form and then that option would be unavailable for the next user accessing the Form.

Source: The Gift of Script: Dynamically remove Google Form options

Fixing dates from a Google Form

For those getting a ‘date’ from a Google Form and finding that it flips the day/month the wrong way around. This small piece of code can be inserted to create a correct date format.

Source: The Gift of Script: Fixing dates from a Google Form

Create a seat booking form with Google Forms, Google Sheets and Google Apps Script – Yagisanatode

In this tutorial, Yagisanatode (@LifeOfSpy) is going to build a simple seat booking Google Form that will contain a registeree’s name and the session that they wish to attend. Each time a registeree submits a request to book a seat for a session, that seat is taken from the list displaying only the remaining seats for that session for when the next user submits the form.

Source: Create a seat booking form with Google Forms, Google Sheets and Google Apps Script – Yagisanatode

Create a Branching Google Form – Teacher Tech

Alice Keeler’s architecture on designing your Google Forms to provide immediate feedback by utilizing branching options is fascinating and efficient.

Create multiple sections in your Form and add only one question per section that determines which section to jump to next. Answer correctly and the branching should take the student to the next question. Answer incorrectly and be taken to a section with a tutorial or hint and a chance to answer a new question.

Source: Fast: Create a Branching Google Form – Teacher Tech

How to use Google Sheets and Google Apps Script to build your own blog CMS

Build a “Content Management System” (CMS) for an online blog using Google Sheets, Google Forms, and Google Apps Script.

Source: How to use Google Sheets and Google Apps Script to build your own blog CMS

Google Apps Script: Google Standard Color Palette Picker for Sidebar and Dialog Boxes in Google Sheets, Google Docs and Google Slides – Yagisanatode

 

I wanted to update one of my free Google Add-on apps that works with colour. What I had is just the standard HTML color input element where the user selects from the palette and that hexadecimal colour code … had always wanted to create a tool for a sidebar or dialogue box that would allow the user to easily access the standard colours or use the custom palette provided by the HTML color input”

Continue reading this post to find out how you can implement your own copy of the colour picker

Source: Google Apps Script: Google Standard Color Palette Picker for Sidebar and Dialog Boxes in Google Sheets, Google Docs and Google Slides – Yagisanatode