AppsScriptPulse

Pseudo OnEdit Trigger for Google Document using Google Apps Script

In the current stage, there is not OnEdit trigger for Google Document. But I sometimes have the case that I want to use OnEdit trigger. So, as the current workaround, I created this sample script. I think that this workaround can be also used for Google Slides, Google Form and also Google Spreadsheet. In the case of Spreadsheet, what the existing OnEdit trigger and the time-driven trigger cannot do can be achieved.

Source: Pseudo OnEdit Trigger for Google Document using Google Apps Script

How to Automatically Add Teachable Students to Google Drive Files and Folders when they Enroll in your Course – Yagisanatode

Learn how to instantly share newly enrolled teachable students to Google Drive files and folders with Google Sheets and Apps Script.

Scott ‘Yagi’ Donald provides a very thorough walk-through of how he has connected a webhook from a third party service to Google Sheets to share specific Google Drive folders and files with named users. This post is well worth a visit as it contains a number of tips and tricks like using Google Forms to follow-up with user email addresses that are not associated with a Google account.

Source: How to Automatically Share Teachable Students to Google Drive Files and Folders when they Enroll in your Course – Yagisanatode

How to Fetch Employee Data from Workday by Building the Great Deku Tree Inside of Google Sheets

They say you only live once, and, with that, you may only once find yourself at a company with a video-game-centric culture. Life at Twitch creates a unique opportunity to bring the magic of gaming to your workday, even when you’re in esoteric corners of the work world such as People Analytics.

Ever wondered how people reporting was handled at Twitch? Max Brawer, Head of People Analytics at Twitch, brings his ‘A’ game outlining how a little Google Apps Script and some Workday API wrangling can be used for some fun reporting. You can read more in the source link and here’s Max’s old post on The Endless Possibilities of Freeing Your Data from Workday and Putting it into Google Sheets: a How-to.

Source: How to Fetch Employee Data from Workday by Building the Great Deku Tree Inside of Google Sheets

Letting users run a Google Apps Script on Google Sheets without authorizing scopes and showing the source code

This is a sample workaround for letting users running Google Apps Script on Google Spreadsheet without both authorizing the scopes and showing the script.

The post highlights the use of the existing =IMPORTML() Google Sheets function and a publish webapp to run a Google Apps Script without the end user having to authorize the script. A limitation of this approach, and also important warning to keep in mind, is the deployed web app needs to be deployed to run as the script owner and by anyone who has the web app link.

Source: Letting Users Running Google Apps Script on Google Spreadsheet without both Authorizing Scopes and Showing Script

Keep a Journal of Special Moments using Twilio Programmable SMS and Google Sheets

Learn how to build a Google Sheet journal that accepts new entries via text message. My toddler recently turned two and a half and my second daughter was born three weeks ago, so special moments are abundant but the ability to remember them is severely compromised. His suggestion of recording a memory every day in an Excel sheet or leather bound journal resonated with me, but after a few days of trying to find time to open up Excel and write a memory I realized I needed a more lightweight solution. … Twilio makes it easy and cheap to set up a dedicated phone number that can record those text messages to a Google sheet.

Nice example on the Twilio blog on using their service with Google Sheets. There is little setup required but this can all be achieved in 4 lines of code. Unfortunately, sending/receiving SMS messages with Twilio is not free, but it might be a service you keep in mind for Apps Script projects.

Source: Keep a Journal of Special Moments using Twilio Programmable SMS and Google Sheets

Enhanced menus in Google Sheets improves findability of key features (and an important update for Google Workspace Developers)

New Google Sheets menus
New Google Sheets menus

We’re updating the menus in Google Sheets to make it easier to locate the most commonly-used features. Some of your favorite menu items may have moved a little, but all existing functionality is still available. We hope that their new home will be more intuitive and make it easier and faster to navigate the product.

Google Workspace Updates

Google have updated the menus in Google Sheets to help with discoverability. For Google Workspace Developers one of the big changes is the new Extensions menu which replaces ‘Add-ons’ and includes links to Macros, Script Editor and AppSheet. Whilst painful if you need to update support documentation the new structure will hopefully make the location of these tools more intuitive. We covered the Google Sheets menu update in the latest episode of Totally Unscripted:

Source: Enhanced menus in Google Sheets improves findability of key features

Bulk create Google Drive Folders and add Files 2.0

Bulk create Google Drive folders with optional files copied into each one. With full control over naming.

Bulk create Google Drive folders with optional files, from a Google Sheet

Bulk create Google Drive folders with optional files, from a Google Sheet

This post is a variation of this Bulk create Google Drive Folders and add Files tool post.

Key Functionality

  1. Maximum runtime – in order to prevent the tool from reaching the limits imposed by Google you can adjust the number of minutes the tool can run for. Change this in the ‘GlobalVariables.gs’ file in the Script Editor.
  2. Continue from where it left off – if you have a lot of Google folders and files to handle and the above runtime is reached the tool will complete the current row/folder and prompt you to run it again, without duplicating any folders or files already created.
  3. Popups – as well as the ‘Log’ sheet the tool displays a direct popup to the user if it encounters a problem.
  4. Full naming control – you have the ability to tweak every single folder and file name that is created by the tool. See the Concatenate section below to understand the true power of this.
  5. Clickable links – created by the tool which means you can navigate directly to the new folders and files directly from the Google Sheet.
  6. Add more files – the tool currently has columns for 10 files to be added to each folder, but you can actually append more as long as you follow the same convention of 2 columns per file (1 file name and 1 file ID). Do this before you run the tool as you cannot add more files to a folder once it has been created.
  7. Add more folders – after running the tool you can either choose to clear all of the data within it (use the ‘Reset sheets’ option from the ‘Admin’ menu) and start again or you can simply append further rows/folders and re-run without any duplication (if the ‘Folder Link’ column is not blank/empty then it will skip that row).

Source: The Gift of Script: Bulk create Google Drive Folders and add Files 2.0

Creating a web app with Google Sheets

A wonderful set of video tutorials showing you how to set up a web app and connecting it to a Google Sheet. It starts off with a simple form and covers areas like getting data from a sheet and sending it back and using Materialize CSS for to easily create a good looking app. Plus, it also looks at connecting a Google Calendar to the app and how to create multiple pages in the web app.

Issues reporting with translation [using Google Apps Script and Google Forms/Sheets

In this post Baz Roberts highlights the benefits of Google Apps Script Language Service to translate Google Form responses into another language.

Source: Issues reporting with translation

Create a book tracker using Apps Script and the Google Books API in 10 minutes

I wanted a quick and easy way for my kids to track the books they read, as well as a way for my wife to catalog all the books in the house. I know there are other services out there like Goodreads that can store your book list…but I just wanted to house the data myself, and not have to create accounts for my young kids.

Nice little project that glues together Google Forms and Sheets and the Google Book API with a little but of Google Apps Script. Follow the link for more information and the source code.

Source: Create a book tracker using Apps Script and the Google Books API in 10 minutes