AppsScriptPulse

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

Adding Slide Page Link to Shape using Google Apps Script

This is a sample script for adding the slide page link to the shape using Google Apps Script

Nice little snippet that might be useful to look at just for an example for adding shapes to Google Slides.

Source: Adding Slide Page Link to Shape using Google Apps Script

Find and replace in a Google Sheet

Cleanse Google Sheet data by searching for specific words in a columns and replacing them with an alternative. Colour any cell changes to highlight. This is one of many ways of performing the task simply using loops.

A list of words to find and their replacement equivalent.

A list of words to find and their replacement equivalent.

Source: The Gift of Script: Find and replace in a Google Sheet

Google Apps Script Example: Automated YouTube Stats Workflow

Visually display status when looping through Google Sheets data with Google Apps Script

show a processing status in a cell when looping through rows in google sheets using google apps script.

When working with small batches of data it can be useful to show the user that the data is being processed. Here is an example script from Sourabh Choraria which use SpreadsheetApp.flush() to force write updates to a Google Sheet. As this method relies on .setValue() instead of .setValues() it’s worth keeping in mind for bigger data sets that using HTMLService and a custom dialog or Speadsheet.toast()

If the .setValue()/.flush() Al from coda has provided this gist

Source: visually display status when looping through google sheets data

How to Unsubscribe from Mailing Lists and Junk Newsletters in Gmail with Google Apps Script – Digital Inspiration

Christian Heilmann’s tweet – Feature request for Gmail: automatically find and follow the unsubscribe link in all highlighted emails – prompted me to build an automated system for unsubscribing your Gmail address from the bulk senders. Here’s how it looks…

This is an older example from Amit Labnol that recently pinged my Google Alerts from this Best Unroll.me Alternatives post. The source post from Amit has some nice details about how marketing emails are marked up and the code shared might be a nice starter for your own solution.

Source: How to Unsubscribe from Mailing Lists and Junk Newsletters in Gmail – Digital Inspiration

Replace text in Google Spreadsheets with Apps Script using TextFinder

Google Sheets has a powerful find and replace function. But you may want to use Google Apps Script to do the same job. StackOverflow has a question on this. The accepted answer would require you to loop through all cells, find the text, replace it and post the new text back to the cell. Google Apps Script has a more powerful, and simpler, method called TextFinder.

Usual post highlighting the TextFinder method which you can use to find and replace text in Google Sheets. The post has more information about this method and how to use it.

Source: Replace text in Google Spreadsheets with Apps Script

Submit a Google Form to a Slack channel via a Webhook

Send a Google Form submission to a specific Slack channel as a message, via a Webhook.

Messages can be posted in to a Slack channel via the Google Form

Screenshot of message when posted in Slack channel

Source: The Gift of Script: Submit a Google Form to a Slack channel via a Webhook

Paginating API Calls in Google Apps Script

The featured image is by Brandi Redd on Unsplash

One of my favorite things about Google Apps Script is that I can get information from an API and write it directly to a shared document or spreadsheet…It’s not uncommon for these requests to come back in paginated form. Meaning, if your request has 100 responses, they’ll come in batches of n size instead of all at once.

Pagination can be tricky. This post has a video and sample script to help you abstract the process of working with paginated API responses in Apps Script.

Source: Paginating API Calls in Google Apps Script

YouTube Email Alerts – Monitor Videos around your favorite Topics [using Google Apps Script] – Digital Inspiration

Learn how to setup email alerts for YouTube videos and get daily automatically notification when new videos are uploaded that match your search topics.

Very slick example from Amit Agarwal and for the more advanced Google Apps Script developer well worth checking out the source code to see how Amit handles setting up and managing script triggers.

Source: YouTube Email Alerts – Monitor Videos around your favorite Topics – Digital Inspiration