AppsScriptPulse

Search Google Drive for owned files

Use Google Apps Script to search Google Drive for all files owned by a user and collate their details onto a Google Sheet.

Provide the owner and maximum script runtime for search Drive for files

Provide the owner and maximum script runtime for search Drive for files

It will collate:

  • The filename,
  • The file ID,
  • A direct/clickable link to the file,
  • The type of file eg PDF, Googe Sheet/Doc, etc.

Source: The Gift of Script: Search Google Drive for owned files

Sort by Random – How to Randomize the Order of Rows in Google Sheets – Digital Inspiration

Learn how to sort your data in a Google Sheet in randomized order using Excel formulas and Google Apps Script.

Nice little snippet from Amit Agarwal which includes some Google Apps Script code for randomising the order of rows in Google Sheets. The code has some clever use of .autoFillToNeighbor(), .offset() and .sort().

Source: Sort by Random – How to Randomize the Order of Rows in Google Sheets – Digital Inspiration

Extract text from multiple Google Docs into a Sheet

The following Google Apps Script is designed to iterate through Google Docs in a given Google Drive folder and extract the paragraphs of text along with a link to each file into a Google Sheet. A new column will automatically be appended for each paragraph.

This tool was designed with the vision that you may wish to centrally collate some comments/feedback written by others in Docs, into one central location so you do not need to open each file in turn.

Provide a Google Folder ID to extract text from Docs

Provide a Google Folder ID to extract text from Docs

Source: The Gift of Script: Extract text from multiple Google Docs into a Sheet

Sending emails on a schedule with Google Apps Script

Ever wondered how you would automate tasks in Google Workspace without using a tool developed by an external entity? Google has your back. In this article, we will see how one can send emails on a schedule. As an example, I have used an annual event. A birthday reminder script, if you will.

A simple example but for those just starting out in Google Apps Script a nice example of using time-based triggers.

Source: Sending emails on a schedule with Google Apps Script

Creating Colorful Buttons on Google Spreadsheet using Google Apps Script

This is a sample script for creating the colorful buttons on Google Spreadsheet on Google Apps Script.

There are some interesting features in this script example, combining the use of Google Slides to create buttons and then assigning a script function to the result using the .assignScript() method.

Source: Creating Colorful Buttons on Google Spreadsheet using Google Apps Script

XPath Tester using Web Apps Created by Google Apps Script (working with existing Google Sheets functions in Apps Script)

In this post, I would like to introduce the xpath tester using Web Apps created by Google Apps Script.

This is an interesting little Apps Script solution from Kanshi Tanaike which uses the existing Google Sheets =IMPORTXML() in a Google Apps Script  Web App to test an XPath. As there is a delay in loading some Google Sheets function results this post includes a nice little coding pattern using a do...while loop to wait for results to render.

Source: XPath Tester using Web Apps Created by Google Apps Script

eMayordomo – Monitoring Gmail and conditional responses with Google Apps Script

Este artículo presenta eMayordomo, un desarrollo GAS capaz de vigilar un buzón de Gmail y responder automáticamente y de manera condicionada a los correos electrónicos procedentes de diversos formularios web, enviando mensajes preparados de antemano. Estas respuestas preparadas soportan HTML, imágenes en línea, archivos adjuntos y emojis.

Google Translate: This article presents eMayordomo , a GAS development capable of monitoring a Gmail mailbox and responding automatically and in a conditional manner to emails from various web forms, sending messages prepared in advance. These prepared responses support HTML, inline images, attachments, and emojis

For non-Spanish speakers you’ll have to hit Google Translate but it is well worth it for the very thorough documentation Pablo Felip has prepared, which includes the source blog post and GitHub repository. The repository is particularly useful to look at as Pablo has taken the time to document and explain the various Google Apps Script functions he has developed, methods used and potential issues/limitations when interacting with a Gmail inbox.

Source: Respuestas automáticas a formularios web con eMayordomo

Bulk create Sheets from a Google Sheet

Use Google Apps Script to bulk create Sheets from a Google Sheet of data. Loop through each row and copy the data to the new file.

Bulk create Sheets from Google Sheet

Bulk create Sheets from Google Sheet

Source: The Gift of Script: Bulk create Sheets from a Google Sheet

Google Apps Script – What a difference 5 years make – Episode 2 [Property Service and Spreadsheet Service updates] – Desktop Liberation

Image credit: Bruce Mcpherson

Image credit: Bruce Mcpherson

How google apps script has changed over the past 5 years. Episode 2 in a series of post covers the Properties Service and the Spreadsheet service

Bruce Mcpherson continues his look at changes in Google Apps Script over the last 5 years, this time looking at PropertiesService and SpreadsheetApp. This post is worth a read just to check you’ve not missed any new methods for working with Google Sheets, because over the last 5 years there have been many!

Source: Google Apps Script – What a difference 5 years make – Episode 2 – Desktop Liberation

Telegram Bot with Inline Keyboard in Google Sheets [and Google Apps Script]

Questa funzionalità permette di visualizzare, insieme al messaggio del bot, una tastiera virtuale con una serie di bottoni dove gli basterà cliccare su uno di essi per scegliere la sua risposta

[Google Translate: This feature allows you to view, together with the message of the bot, a virtual keyboard with a series of buttons where it will be enough to click on one of them to choose its response]

The accompanying video and post for this solution are in Italian and Google Translate might be required. This is a great resource and another example of a high quality video produced by the Apps Script community. The solution provides an overview of how you can display an inline keyboard within a Telegram Bot using a single Google Apps Script project.

Source: Telegram Bot with Inline Keyboard in Google Sheets