AppsScriptPulse

BAS#005 | Create a Google Slides presentation handout in Google Docs with Apps Script

Generate summary documents of your Google Presentations with thumbnails and speaker notes using Apps Script. In this BAS you will learn how to generate a summary text document with the thumbnails and notes obtained from the slides from a Google presentation. For this we will use the Apps Script services of Documents (mainly) and Presentations. Plus, you’ll do it efficiently thanks to the awesome UrlFetchApp.fetchAll() method.

If you don’t speak/read Spanish you’ll have to hit Google Translate to read this latest contribution from Pablo Felip. As described by Pablo: “Apps Script Basics (Básicos Apps Script – BAS, in Spanish) is a series of posts targeted to newcomers to Google Apps Script. Each BAS solves a simple, real-world problem, provides a thorough step-by-step break-down of the source code suitable for people who are learning how to leverage this platform and introduces key Apps Script patterns.”. This particular ‘Básicos Apps Script’ includes some useful information on building tables in Google Docs which could be useful in other contexts like generating reports.

Source: BAS#005 | Generating a presentation summary document with Apps Script

Discover how to interact with Coda webhook-based automations using Google Apps Script

Discover how to interact with Coda webhook-based automations using Google Apps Script! In this post, we’ll explore different code patterns in both Coda’s formula language and Google Apps Script to send data contained in a Google Spreadsheet to a Coda table, and also perform other related tasks, using the new (May 2022) webhook-powered Coda automations.

For those unfamiliar with Coda:

Coda provides word-processing, spreadsheet, and database functions. It’s a canvas that blends spreadsheets, presentations, apps, and documents together. The software can integrate with third-party services like Slack and Gmail.

This post from Pablo Felip is a great opportunity to see what is possible using the new Coda webhook-powered automations. We’ve previously featured a couple of Coda/Apps Script integrations on Pulse, that have highlighted solutions using the Coda REST API and Coda Packs. This is the first we’ve seen using webhooks, which have a ‘no-code’ when/if/then setup interface. This route may provide the quick glue required for your Coda/Google Workspace integration. Pablo includes all the source code in the post as well as detailed instructions for setting up.

Source: Coda webhooks 💙 Google Apps Script!

Dynamically resizing dialogs in Google Workspace documents using Google Apps Script and google.script.host

In this article, we’ll go over the different ways a GAS script can relate to the user using it, and show an easy way to dynamically resize dialogs built using the Apps Script HTML Service. To achieve this, we will introduce some basic concepts related to the object model of HTML documents and their manipulation using JavaScript. – [Google Translated]

A couple of community contributions for custom dialogs have landed in the Pulse inbox recently. The official documentation on Dialogs and Sidebars in Google Workspace Documents is an excellent starting point, but if you prefer learning from video tutorials Chanel Greco has recently published Google Apps Script Alert – Deep Dive on the saperis YouTube channel.

If you’d like to go a little further this post from Pablo Felip details how custom dialogs can be dynamically resized using the methods in google.script.host and client-side JavaScript (for non-Spanish speakers you’ll have to view this post via Google Translate).

Source: Cuadros de diálogo de tamaño dinámico en Apps Script

Bulk reset slicers in a Google Sheets, the Apps Script way

This article explains how the filtering criteria of Google Sheets slicers can be reset using a few lines of Apps Script code. Two different approaches are shown. The first one uses the Spreadsheet Service, while the second one draws upon the Google Sheets API using the Advanced Sheets Service. Additionally, some shortcomings and peculiarities of both methods are highlighted.

Kudos to Pablo Felip for taking the time to explore and write-up this post about Google Sheets ‘slicers’. It contains some very useful tips and advice about  interacting with them using Google Apps Script.

Source: Bulk reset slicers in a Google Spreadsheet, the Apps Script way

Checking Google Groups membership recursively using Google Apps Script

Learn how to check indirect membership of users or groups in the context of the Google Groups Service using Apps Script.

This is a great post if you want to learn about how to programmatically navigate the hierarchy of Google Groups, which may also come in handy when you are processing other tree like structures often found in JSON. All the code needed to run this is provided and clearly explained.

Source: Getting Google Groups membership recursively using Apps Script

Using community connectors to go beyond filter by email in Data Studio – pablofelip.online

This article discusses row-level security in Google Data Studio and shows how community connectors can be used to overcome the limitations of the native feature when accessing data stored in Google Sheets.

I don’t think one of our summaries could ever do justice to this contribution from Pablo Felip. The post has a very thorough summary of row-level security and how Community Connectors coded in Apps Script can be used for additional levels of functionality.

Source: Using community connectors to go beyond filter by email in Data Studio – pablofelip.online

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

Calculating moving averages in Google Sheets with Google Apps Script (and tips on writing custom functions)

Por esa razón me he puesto manos a la obra y he preparado MEDIAMOVIL(), una función personalizada GAS capaz de calcular varios tipos de medias móviles, que puede ser utilizada (como todas las funciones personalizadas) de manera combinada con el resto de funciones integradas que nos ofrecen las hojas de cálculo de Google.

TRANSLATED: For this reason I have gotten to work and have prepared MEDIAMOVIL(), a custom GAS function capable of calculating various types of moving averages, which can be used (like all custom functions) in combination with the rest of the integrated functions. offered by Google spreadsheets.

Great post from Pablo Felip (@pfelipm) on calculating moving averages in Google Sheets. As part of this Pablo has developed and shared the MEDIAMOVIL() custom function he has developed in Google Apps Script. Clicking through to the source code on Github Pablo has also shared lots of advice on developing custom functions for Google Sheets including using the contextual help features available in custom functions as well as handling parameters and throwing appropriate error messages to the user.

Source: Calculando medias móviles con Google Apps Script

DNSQuery and G Suite domain detection in Google Sheets using the Cloudflare name resolution service

Dos funciones personalizadas para hojas de cálculo de Google desarrolladas en Apps Script que proporcionan un envoltorio para la función NSLookup, tal y como aparece en la documentación del servicio de resolución de nombres de CloudFlare. Consulta el registro indicado en el o los dominios que se pasan como parámetro utilizando el servicio de resolución de nombres de CloudFlare. Determina si un email o dominio (o lista de emails o dominios) está gestionado por Google o no. – pfelipm/dnsquery

Pablo Felip Monferrer has shared two custom functions for Google Sheets that provide an extension to the NSLookup function originally shared by Cloudflare. The first is a wrapper that makes it easy to list specific DNS record types for a single or list of domains. The second function uses the domains MX record to automatically detect if a domain has G Suite Gmail settings applied.

Source: pfelipm/dnsquery

AutoSlides | A multi-functional tool that refreshes Google Slides automatically without reloading

AutoSlides is a Google presentation template powered by Apps Script code design to be used in unattended information points, although it can also be used as an informational element, linked or embedded, on any website.

Google presentations have a publishing feature that facilitates their dissemination. In this way they can be linked or embedded in web media with ease. However, if the presentation slides are modified it is necessary to reload the page that contains its versions published in the browser so that these changes are manifested. AutoSlides is capable of generating a self-hosted slide show, visible using a browser, that automatically refreshes at predetermined intervals without reloading the web page manually in the browser.

Source: pfelipm/autoslides