AppsScriptPulse

Bulk rename files in Google Drive

Screenshot of File renamer text fields

Screenshot of File renamer text fields

This is designed to automate bulk renaming of multiple files within a single Google Drive folder. It has been developed as a Google Sheet with flexibility towards entering your own search pattern and replacement string as you see fit.

Source: The Gift of Script: Bulk rename files in Google Drive

Bulk send emails from a Google Sheet

This is designed to loop through each row of a Google Sheet and send an email containing information from it. This means you can send personalised emails with ad-hoc information for each recipient quickly.

It has been developed so that it is easily expandable for you to add further columns/rows. The script has a number of features to achieve this:

  1. A menu option for easily selecting to send email, with a confirmation dialogue popup.
  2. A timestamp as confirmation for when an email was sent.
  3. A check that an Email Address is present and there is no current value in the Email Sent column – to prevent repeat email sending but also allow ad-hoc emailing by clearing this column for those you wish to send again.
  4. A try/catch to help automatically deal with problematic emails that may break the script – an error message will be written into the Email Sent column and the script will continue on to the next row.

Source: The Gift of Script: Bulk send emails from Google Sheet

Bulk create Google Drive folders from a Google Sheet

The following Google Apps Script code was developed to bulk create Google Drive folders with data from a given spreadsheet (eg to name the folders and add permissions). It uses the Module Name and Marker to form the folder name as it iterates through each row in turn. At the same time it takes the Marker Email Address and uses the ‘DriveApp’ to provide edit access to the folder. Finally it creates another sub-folder in each folder as an extra.

Source: The Gift of Script: Bulk create Google Drive folders

Creating dummy data for Gmail using Google Apps Script

Nice little helper script from Eric Koleda using a model you might want to use in other projects to testing/debugging.

The simplest OAuth2 server in 120 lines using Google Spreadsheet and Apps Script

oauth2

Explore how to setup your own OAuth2 server using Google Spreadsheet and App Script.

Source: The simplest oauth2 server in 120 lines : Google Spreadsheet and App Script

Bulk Gmail Label Manager (made with Google Apps Script)

Use this spreadsheet to manage your Gmail labels in bulk! To get started, follow the steps below:

  1. Make a copy of this spreadsheet.
  2. Wait a few moments for the “Bulk Labels” menu to appear.
  3. Click “Bulk Labels > Pull labels”.
  4. When prompted, grant the script authorization to your account.

You can then use the spreadsheet to create, rename, and delete labels. You can also merge labels, which deletes a label but also moves all of it’s messages to another label.

When ready, click “Bulk Labels > Perform actions” to make the updates.

Accessing Cloud SQL from AppsScript to plot data from IoT Core

In my last post, I wrote about publishing device telemetry from Cloud IoT Core to Cloud SQL. The natural thing to want to do after this is to plot that data and I have found using Apps Script with Google Sheets to be a great way to get this working quickly.

In this post you’ll find some helpful advice on connecting to Google Cloud SQL server with Google Apps Script.

Source: Accessing Cloud SQL from AppsScript to plot data from IoT Core

Google Sheets: Code Adding Content to Multiple Tabs – Teacher Tech

Coding Google Apps Script is easier than you think it is. Learning to code can increase your productivity significantly. One thing I frequently code is adding the same piece of information to multiple tabs in a spreadsheet…

This article presents the building blocks for performing the same action to each sheet in your workbook to eliminate time and mistakes.

Source: Google Sheets: Code Adding Content to Multiple Tabs – Teacher Tech

Google Script Automation: Create New Sheets Tabs Automatically

Take it off your weekly to-do list — learn how to automatically create a new tab, clear a designated range, and delete an old tab in Google Sheets.

Source: Google Script Automation: Create New Sheets Tabs Automatically

Building a Deep Neural Net In Google Sheets

I want to show you that Deep Convolutional Neural Nets are not nearly as intimidating as they sound. And I’ll prove it by showing you an implementation of one that I made in Google Sheets.

Source: Building a Deep Neural Net In Google Sheets