AppsScriptPulse

A tiny Google Apps Script tool to synchronize Google Drive permissions which can also process large amounts of data

Image credit: Inclu Cat

Are you using Google Drive to share information with your staff? As the number of staff members increases, it can become increasingly difficult to manage permissions properly. I faced a similar issue. As the members of the team changed from time to time, setting access rights for each folder became a cost that could not be ignored. So I used Google Apps Script to create a tool to synchronize the permissions management table with the actual permissions.

We’ve previously featured Inclu Cat’s posts on ways to deal with Google Apps Script’s 6-minute execution limit [Ref 1 & Ref 2]. These posts continue to prove to be incredibly popular and usually feature in our most read list. Even if you aren’t interested in programmatically managing Google Drive file/folder permissions this post is a nice example of using the authors LongRun solution to process large amounts of data with Google Apps Script. From the source link you can find the GitHub repo with all the code you need and setup instructions.

Source: [Google Drive] A tiny tool to synchronize permissions

[Google Sheets] Word Highlighter (made using Google Apps Script)

I have created a handy highlighting tool using Google Sheets and Google Apps Script. The specification of this tool is very simple.

  1. The user pastes a message into the certain cell (A2).
  2. The tool checks if the message contains some words which listed in another dedicated sheet(Spam Word List).
  3. The tool highlights (bold and color red) the found words in the message.

Here is a nice post demonstrating how you can use Google Apps Script to highlight keywords within a Google Sheets cell. The solution uses  SpreadsheetApp.newTextStyle() to create a custom style which is then applied to part of the cell text.

Source: [Google Sheets] Word Highlighter

How to use Google Apps Script to process large amounts of data

Senbei is a traditional Japanese cracker made of rice. It is a very tasty cracker that goes well with Japanese tea, but there are also huge Senbeis as big as your face. What do you do when you eat such a big cracker? Usually, you would crush them into small pieces before eating them. The same can be said for processing huge data with Google Apps Script.

Some tips and tricks for handling script runtime and triggers total runtime quotas in Google Apps Script. Make sure you click through to another post from the author for code on An easy way to deal with Google Apps Script’s 6-minute limit.

Source: How to use Google Apps Script to process large amounts of data

An easy way to deal with Google Apps Script’s 6-minute limit

Image credit: Inclu Cat

Google Apps Script is handy, and it will help you a lot in your work. However, as you use it, you may hit a big wall. That is the six-minute limit on execution time. As the official documentation states, the maximum allowed time per execution of Google Apps Script is 6 minutes.

If the script execution time reaches 6 minutes, the script will stop suddenly, and an error message “Exceeded maximum execution time” will be displayed.

For as long as Google Apps Script has been around there have been various solutions published for handling the 6 minute execution limit. This post from Inclu Cat presents a nice overview and solution for the execution limit.

This is also an issue also recently covered by Amit Agarwal who takes a slightly different approach in Exceeded maximum execution time Exception in Google Apps Script, by breaking the execution before the limit is reached.

Source: An easy way to deal with Google Apps Script’s 6-minute limit