AppsScriptPulse

Google Drive Monitor – Get Email Alerts When Files are Deleted in your Drive with Google Apps Script – Digital Inspiration

Monitor your Google Drive automatically and get email alerts when important files and folders are deleted from your Google Drive. You can also watch file activity in Shared Drives

Source: Google Drive Monitor – Get Email Alerts When Files are Deleted in your Drive – Digital Inspiration

How to Make your Documents Read-only in Google Drive using Google Apps Script – Digital Inspiration

Your documents and files in Google Drive can be modified by anyone who has edit access to the file. You can always remove external collaborators from your documents to prevent them from editing your files but how do you prevent yourself (the owner) from accidentally editing your own files in Google Drive? Google Drive doesn’t have a simple button (yet) for locking files so here’s a little Google Script that can help you make any file in your Google Drive read-only.

Nice post from Amit Agarwal showing how the new Google Drive Locking API can be used with Google Apps Script. The post contains all the code and instructions you need to get started.

Source: How to Make your Documents Read-only in Google Drive – Digital Inspiration

Converting SVG Format to PNG Format using Google Apps Script · tanaike

This is a sample script for converting the SVG image data to PNG image data using Google Apps Script. Unfortunately, in the current stage, there are no methods for directly converting the SVG to PNG in Google Drive service. But it can be achieved by Drive API

Nice trick to get .svg files stored in Google Drive in a raster format.

Source: Converting SVG Format to PNG Format using Google Apps Script · tanaike

The Gift of Script: Bulk create Google Docs from Google Sheet data

The following is designed to bulk create Google Docs from rows of data within a Google Sheet and to include some of that data within the new Doc body (so they become customised files). It also creates a link to the new Google Doc back in the Sheet on the relevant row.

Rows of data in a spreadsheet will transfer into a Doc

Example rows of data in a Google Sheet

Source: The Gift of Script: Bulk create Google Docs from Google Sheet data

Bulk create Google Drive folders 2.0 with Google Apps Script

The following was developed to bulk create Google Drive folders with data from a given spreadsheet (eg to name the folders and add permissions). It is an improved version of the tool built in April 2019

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

Google Apps Script: Extract Specific Data From a PDF and insert it into a Google Sheet – Yagisanatode

Have you ever asked for a list from a client, another department or agency and instead of saving into a file that might even be considered marginally useful, they give it to you as a pdf. … Continue reading “Google Apps Script: Extract Specific Data From a PDF and insert it into a Google Sheet”

Yagi shares a comprehensive walk-through of how you can sometimes extract data from .PDF documents using Google Apps Script and the advance Drive service. The solution is also able to work on .PDFs created from images using the built-in OCR features of Google Drive and you might want to drop the getTextFromPDF() function shared in the post.

Source: Google Apps Script: Extract Specific Data From a PDF and insert it into a Google Sheet – Yagisanatode

The Gift of Script: Create a Shortcut in Google Drive with Google Apps Script

The following Google Apps Script is designed to create a Shortcut to an existing Google Drive folder, within another folder..

For Google Drive pros you can currently place a file in multiple folders, but Google will be removing this functionality on 30 September 2020. In March Google announced general availability of shortcuts in Google Drive, is is designed to replace the ‘file in multiple locations’ feature. For Google Apps Script developers wanting to migrate to Drive Shortcuts Phil Bainbridge provides this useful Apps Script snippet.

Source: The Gift of Script: Create a Shortcut in Google Drive

G Suite Solutions —  Apps Script Powered Workflow Automation

Laura Taylor recently spoke at SheetsCon on the topic of Automation with Apps Script. During the presentation, she walked through a simple approval workflow for a hypothetical small business to demonstrate the power of Apps Script to automate workflow inside G Suite. She also showcased modern ECMAScript features supported by the new Apps Script V8 Javascript runtime.

The article is an overview of the workflow covered in the author’s presentation along with install instructions for trying it out in your G Suite domain.

Source: G Suite Solutions —  Apps Script Powered Workflow Automation

Bulk save emails from Gmail

Screenshot of setup sheet for tool.

Screenshot of setup sheet for tool.

This tool is designed to bulk save emails (and associated attachments) from a specified Gmail label into a Google Drive folder, with relevant threads combined into a single PDF document.

Source: The Gift of Script: Bulk save emails from Gmail – overview

Apps Script – Adding and removing Drive files and folders

In case you didn’t know, Google Drive has the ability to store files and folders in more than one place at a time. So, you could have a file in a folder for a particular company and have the same file in a different folder which is where you store all the reports. It’s something you can’t do in a traditional computer folder system.

Source: Apps Script – Adding and removing Drive files and folders

Convert Doc to PDF and move into a new folder with Google Apps Script

Create a PDF version of a Google Doc, move it into a new folder, remove its parents so it only exists in the new folder (typically also exists in My Drive) and then trash the Doc.

Source: The Gift of Script: Convert Doc to PDF and move into a new folder

Google Apps Script —Track videos viewed on Google Drive within your organization

SCENERIO: You are admin of a G-Suite set up. You upload training videos for your organization members on Google Drive/Team Drive. To increase productivity, you want to ensure all members watch the videos you upload.

SOLUTION: You utilize this amazing GSuite Reports API and use Google Sheets as your dashboard to view all details about your MP4 videos.

Source: Google Apps Script —Track videos viewed on Google Drive within your organization

Copy template sheet to Google Sheets and reorder

Template sheet with signatures to copy to other files

Screenshot of template sheet with signatures to copy to other files

Take a template Google Sheet (containing fields for 3 signatures) and copy it into other Google Sheet files within a given Google Drive folder and then reorder those sheets so that it was the first one.

The idea was based around needing users to authorise student marks with their signature from multiple Google Sheet reports produced from a third party system.

Source: The Gift of Script: Copy template sheet to Google Sheets and reorder

Batch get existing Google Drive folder IDs & names

Get the folder IDs of a large number of current Google drive folders along with parts of their name – for capturing in a Google Sheet.

Source: The Gift of Script: Batch get existing folder IDs & names – version 2.0

Create alphabetised folders in Google Drive

Screenshot of Google Drive folder layout

The script is designed to bulk create folders from a Google Sheet and to arrange them into alphabetised folders within Google Drive, by extracting the first letter of a user’s surname.

If a suitable alphabetised folder does not exist in Google Drive, then one is created. The script also adds the created folder to an ‘Everybody’ folder so that there is a single area with all the folders listed in.

Source: The Gift of Script: Create alphabetised folders in Google Drive

Subscribe to Apps Script Pulse...