AppsScriptPulse

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

Help! My time triggers are not in sync! : How to update your Google Apps Script project time zone. – Yagisanatode

If you have made it to this post you are probably a little frustrates about why your Google Apps Script time triggers are not running on or around the times that you have designated … To cut to the chase, the likely cause of clock triggers not running in the time range that you have selected is that the time zone in your Google Apps Script project is out.

Scott ‘Yagi’ Donald provides some very useful tips on how you can check and adjust your Apps Script project’s timezone.

Source: Help! My time triggers are not in sync! : How to update your Google Apps Script project time zone. – Yagisanatode