AppsScriptPulse

Create automated backups of Google Sheets with Google Apps Script

The problem comes when you have to load that info in your app. … The more the data, the more time to load. You could use Apps Script to schedule backups of your data.

A nice introduce into Google Apps Script with an opportunity to learn how to archive data from one Google Sheet to another. This solution comes from Mozart García who is more often seen on YouTube producing short Google Apps Script how-to in Italian (Bravo! Mozart on recently passing 4K subscribers)

Source: Create automated backups with Apps Script

How you can use Google Docs to write and execute Google Apps Script code

Image credit: Amit Agarwal (labnol.org)

There is a way to use Google Docs as a programming IDE and run JavaScript code inside the editor …  It is no replacement for a dedicated IDE like Visual Studio code but Google Docs can be used as a JavaScript playground to quickly run code snippets.

A familiar story I hear is people with no formal coding experience starting their developer journey with Google Apps Script. I find being able to run small snippets of code are a great way to learn and a number of sites like W3 Schools and also increasingly Stack Overflow include the ability to ‘try it yourself’ with inline code runners.

If you are looking to support users getting started with Google Apps Script Amit Agarwal has this little code snippet which lets you inline/run Google Apps Script code in Google Docs. There are both limitations and considerations with this approach but as a quick way for learners to run and collaborate on small snippets, which can be contextualised with explanatory text/resources, it’s a nice starting point. Check out the source link for more details.

Source: How to Use Google Docs as a Code Runner – Digital Inspiration

Import CSV data into Google Sheet using Google Apps Script

Loop through CSV files in Google Drive and extract their contents into specific areas in Google Sheet files.

CSV File template to copy data into

CSV File template to copy data into

The following Google Apps Script is designed to loop through a folder of CSV files in Google Drive, extract the data, create a Google Sheet file per CSV, and insert the data into specific rows/columns.

Source: The Gift of Script: Import CSV data into Google Sheet files

How to create a Trello card using Google Apps Script

If you are a Google Workspace and Trello power user like me, I’m sure the thought has come across your mind of connecting your Google Apps to Trello, but every time you search for a solution you get an ad for Zapier or IFTTT. I try to avoid these solutions because they are great at making an initial connection, but if you ever want to do anything advanced, it will require you to sign up for a premium subscription. After searching and not finding answers, I decided just to try and build it for myself.

If you are a beginner to Google Apps Script this is a nice tutorial if you are interested in learning about connecting with other services, in this case Trello. Hopefully this post also illustrates that coding aspect of connecting with other services using Google Apps Script can be straightforward once access had been setup on the third party site.

Source: How To Create a Trello Card from Apps Script

An automatic random team maker using Google Apps Script

In this post, we’re going to look at a script to be able to make even teams from a selection of players. I play football every Sunday and every week my friends sign up to play and most weeks there are different players playing, so we end up having to make the teams, and trying to do it as fairly as we can, which inevitably takes some time.

Nice ‘weekend project’ from Baz Roberts highlighting how Google Apps Script can be used to do a weighted random shuffle of data. The post includes a line-by-line explanation of what the script is doing and a great resource if you are at the beginning of your Apps Script journey.

Source: Automatic Team Maker — Apps Script (also available on bazroberts.com)

Google Chat Apps for Google Apps Script Developers

In this article, we will look at Google Chat Apps and go over some of the basics of developing a chat app with Google Apps Script.

Scott Donald provides a comprehensive overview of everything you need to know to get started with Google Chat app development with Google Apps Script.

One of the nice things about Google Chat app development is there are a number of different implementation architectures you can use, including Google Apps Script. Regardless of the architecture you choose there are some common steps such as GCP setup, receiving/responding to messages and using dialogues and card interfaces all covered in Scott’s post. Click through to find out more…

Source: Google Chat Apps for Google Apps Script Developers – Yagisanatode

Search Google Drive for ‘Shared with me’ with Google Apps Script

Search Google Drive for all of the files found in the Shared with me space and collate the results into a Google Sheet.

Search Google Drive 'Shared with me' and collate the results

Search Google Drive ‘Shared with me’ and collate the results

It will collate the following information into a Google Sheet:

  • The file name as a direct clickable link,
  • The file ID,
  • The type of file eg PDF, Google Sheet/Doc,
  • The file creation date,
  • The file last updated date,
  • The folder path,
  • The file owner.

Source: The Gift of Script: Search Google Drive for Shared with me

Update Notion Databases from a Google Sheet (with Apps Script)

Phew — after two days of trying to find a solution for how to accomplish a popular, reasonable set of tasks in Notion’s API, I wanted to do my duties as a Google Developer Expert and blog the solution for others to use.

A familiar story for many developers is getting stuck on a problem. Max Brawer takes some time out to share how he solved a recent problem interacting with the Notion API with Google Apps Script. Max’s post includes lots of great tips for unpicking the steps required to get Apps Script talking to Notion.

Source: Update Notion Databases from a Google Sheet (with Apps Script)

Create a room availability dashboard for Google Workspace with onleetable and Apps Script

Make a Room availability dasboard for your Google Workspace domain wihtin a minute with onleetable and Google Apps Script

This post from Stéphane Giron caught my eye for a couple of reasons. Besides a quick and easy solution for displaying room availability in an attractive table as a bonus you can see/copy the script Stéphane uses to extract calendar data into a Google Sheet. Follow the source link for the code and more details.

Source: Create a room availability dashboard for Google Workspace with onleetable and Apps Script

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