Retrieving a Google Docs body text is quite easy with the help of Google Apps Script.
Well, until it isn’t. Let me explain.
Continue reading “Get a Google Docs Body Text with Apps Script”
Google Workspace and Software Development
Retrieving a Google Docs body text is quite easy with the help of Google Apps Script.
Well, until it isn’t. Let me explain.
Continue reading “Get a Google Docs Body Text with Apps Script”
If you have ever tried to get a list of all the child files and folders of a parent folder in Google Drive, you’ve no doubt discovered that it is a slow old process. Iterating over each item in a folder and then reading the metadata of that file or folder before calling the next one can take forever!
The built-in DriveApp Class for Google Apps Script is great for working on a small number of files and folders but it just doesn’t have the functionality to retrieve specific fields in your metadata, nor does the searchFiles method or searchFolders method have the ability to isolate just the fields that you want to retrieve. Subsequently, your processing time increases significantly as it ships junk data.
This tutorial is my attempt at, as the kiddies say today, creating a ‘blazingly fast’ file and folder iterator with Google’s Drive API v2 for Apps Script.
You’ve created an awesome Google Apps Script web app for your secret society within your Google Workspace organisation or …dom! dom! DOM! … the world. The problem is that you only want to share your web app with the worthy. Those selected few. 🐐🛐🛐🛐
How do you do this? How to prevent this most coveted of apps from reaching the wrong hands?
It’s actually surprisingly simple.
In this tutorial, we will explore how to validate selected users to provide access to your web app. For our example, we validate users based on whether or not they have edit access to a Google Drive file ( a common occurrence). In the discussion, we will also look at alternative ways of validating emails.
One of the bonuses of the approach we will go through is that it can also be easily adapted for use in Google Workspace Add-ons, and Editor Add-ons like sidebars and dialogue boxes.
We’ll start off with an example and then move to a quick-use guide for those of you who just want to get in and apply the code to your own project. Then for those who want to know how it all works, I’ll dive into the details.
Let’s get started!
Continue reading “How to Validate Specific Users on a Web App in Google Apps Scripts”
Google Apps Script: DriveApp, PropertiesService, SpreadsheetApp, GmailApp, SlidesApp. Google Slides, Google Sheets.
Have you ever wondered how people create certificates en mass and send them out automatically? You are in the right place.
In this tutorial, we are going to:
We’ll set it up so it is super user-friendly with a handy menu in your Google Slide template so that all you have to do is to update your Google Sheet of names each time you run the course and then click a few buttons.
Also, we will run an example so you can see how it all works and what you need to do to set it up.
For the coders out there, I think I have documented the Google Apps Script code enough for you to figure out how to quickly implement your own project. However, I have also added a smalls discussion of some parts of the code at the end.
This is a standalone tutorial. However, it draws from two main tutorials if you want to explore those first (Though it is not essential):
Let’s get cracking.
Table of Contents
Google Apps Script: SpreasheetApp, DocumentApp, DriveApp; Google Sheets, Google Docs
If you have ever worked in LibreOffice or Microsoft Excel you will probably be familiar with the mail merge. Traditionally, mail merge is used to create multiple versions of a document and snail-mail them to someone.
These days, we don’t often use the snail mail approach, but it is a regular occurrence for us to need to produce multiple versions of reports based on a data set usually from a spreadsheet.
In this tutorial, we will create a document merger that will create new Google Documents based on a dataset from a Google Sheet using Google Apps Script.
If you want to quickly jump into your own project with our script, I’ll provide you with a quick-use guide.
Then, we will set up a template for our Google Doc and generate our Google Sheet data (don’t worry, I’ll share the document so you can follow along).
Finally, we will jump into the breakdown of the code for those legends who are learning how to create their own Google Apps Script.
Let’s get started:
Note: As always, take what you need and don’t worry about the rest.