AppsScriptPulse

How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script – Yagisanatode

Learn how to find and replace text with a link in Google Docs with Google Apps Script Document App with 3 different scenarios.

So you are a citizen Google Apps Script developer and you’ve decided to make yourself a mail-merge-type project where you want to create new documents from a template. … Now you want to take it to the next level and replace the text with a hyperlink containing the text and the URL. You might be scratching your head wondering where the replaceTextWithLink() method is or why you can’t simply chain the setLinkUrl() method without making a hyperlink out of the entire body of the document.

Another one of Scott Donald’s very thorough tutorials, this one exploring link creation in Google Docs.

Source: How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script – Yagisanatode

Going GAS – Book preview on Google Books

Image credit: O'Reilly

Whether you’re moving from Microsoft Office to Google Docs or simply want to learn how to automate Docs with Google Apps Script, this practical guide shows you by example how to work with each of the major Apps Script services.

Bruce Mcpherson the author of Going Gas has recently highlighted in the Google Apps Script Community that a chuck of his book is currently available for free in the Google Books preview (133 of the 456 pages are available). Bruce highlights that since publication in 2016 there have been a number of changes in Google Apps Script most notably the move to modern JavaScript syntax in the V8 engine, but much of the content may still be of interest.

Source: Going GAS

Google App Script Properties and Cache Services

Properties and Cache

Video showing the Properties and Cache Services available for Google Apps Script

  • The Properties and Cache Services are designed to hold data for use beyond a single run of a script.
  • The Legacy IDE had an option to see view and directly interact with the Script Properties. This is not available in the new IDE but the service still exists and can be interacted with via code.
  • The primary difference between the PropertiesService and CacheService is that key-value pairs in the Cache are automatically deleted after 25 minutes, while data in the PropertiesService persist until deleted via code (or manually from the Legacy IDE)

Interesting to see a growing number of video tutorials being produced by the App Script community. The latest we’ve come across comes from  Spencer Farris who in this post provides an overview of the Properties and Cache service. Click through to the source post to watch the video and access additional resources.

Source: Google App Script Properties and Cache Services

Create Filters in Google Sheet using Google Apps Script

How to create filters in Google Sheets using Google Apps Script.

There are lots of ways you can filter data in Google Sheets and in this post Aryan Irani uses SpreadsheetApp.newFilterCriteria() to create a filter and then copy the filtered data to a new sheet. The post contains everything you need to know to filter data in this way.

Source: Create Filters in Google Sheet using Google Apps Script

Generate a quick unique(ish) value

Generate a quick, random and fairly unique value in Google Apps Script. Found this useful for random strings to use as Meeting IDs for example.

Source: The Gift of Script: Generate a quick unique(ish) value

Automate Google Sheet Reporting in 5 minutes

Have you ever collect data with google sheets where the sheets are shared with everyone in your organization for inputting their weekly, monthly data such as performance reporting, inventory reporting, or KPI data reporting? How good if these repetitive actions can be automated and the final report can be emailed out to respective people (such as your boss) every month? Yes, this article can help you to achieve this target!

This is a nice tutorial if you are looking for a quick way to send Google Sheets charts by email.

Source: Automate Google Sheet Reporting in 5 minutes

Create a simple Approval process via Email with Google Form and Google Apps Script (Web Apps Deployment)

At the end of this article, you will know how to create a workflow app, based on a Google Form that send an email to be approved or deny including logging of who is approving or denying with Apps Script.

Great post from Jérémy Dessalines who has put together this tutorial for a custom workflow using a Apps Script Web App. The post covers triggers, the publication process and how to generate a unique ID and includes some great tips at the end.

Source: Create a simple Approval process via Email with Google Form and Google Apps Script (Web Apps…

Find and replace in a Google Sheets with Google Apps Script – whole data search

This solution cleanse Google Sheet data by searching for specific words and replacing them with an alternative. As part of this the solution highlights cell changes with an alternative colour. This example uses ‘TextFinder’ rather than ‘For Loops’.

Use the 'Welcome' sheet for input to run the tool

Use the ‘Welcome’ sheet for input to run the tool

Source: The Gift of Script: Find and replace in a Google Sheet – whole data search

How to Create a Custom Email Auto-responder for a Google Forms Submission with Google Apps Script – Yagisanatode

A few days before publishing this post, I put a call out for some Beta testers to get free access to my new course Google Sheet: Learn the Essentials through 3 Detailed Projects.

I needed a way to provide coupon codes for free access to the course in exchange for some feedback and much-needed tutorials.

To do this, I created a Google Form.  This contained some details and expectations, and then some details about the submitter and a consent checkbox at the end. If the submitter consented and hit submit I wanted them to get an email back with the coupon code.

In this tutorial, we will go through how to create a custom auto email response containing:

  • The submitter’s name in the greeting.
  • Your email message.
  • Your primary signature block from your Gmail account.

Source: How to Create a Custom Email Auto-responder for a Google Forms Submission with Google Apps Script – Yagisanatode

Bulk create Google Drive folders with a sub-folder

Bulk create Google Drive folders with a sub-folder from data given in a Google Sheet. Optional user permissions can be added.

Bulk create Google Drive folders from a Sheet of data

Bulk create Google Drive folders from a Sheet of data

This tool and blog post is largely a continuation of this one for bulk creating Google Drive folders. The main difference being that there is an extra column to provide the name of your sub-folder. Note that the tool will try to create a sub-folder regardless of what is entered – as I was just aiming to create a version for the many requests I got from the previous blog post from people who wanted a sub-folder.

Source: The Gift of Script: Bulk create Google Drive folders with a sub-folder