AppsScriptPulse

How to use Google Apps Script to automate your Gmail out-of-office message

As a Developer Advocate for Google Workspace, I live and breathe productivity tools. But even the most tech-savvy among us can have frustratingly simple oversights. My recurring pain point? Forgetting to turn on my Gmail vacation responder to automatically notify people of my absence before heading out of office.

Google Workspace Developer Advocate, Chanel Greco, has shared a clever solution to automate their Gmail out-of-office notification using Google Apps Script. Faced with the recurring problem of forgetting to set up the out-of-office notification, Chanel crafted a script that does the job based on Google Calendar events marked as ‘outOfOffice’.

Chanel’s project not only solves a personal problem but also demonstrates the benefits of Google Apps Script for task customization and productivity. By harnessing the power of Workspace APIs, you can create innovative solutions to automate routine tasks and streamline workflows.

Follow the source link to read more…

Source: How I Used Apps Script to Never Forget My Gmail Vacation Responder Again

Ghislain Sanjuan on LinkedIn: Google Admin and the raiders of the lost calendar (combining Google Workspace BigQuery logs and Apps Script)

#GoogleCalendar gave me a funny adventure !

Here’s a fun and useful take from Ghislain Sanjuan explaining how you can restore deleted calendar events using Google Apps Script. To restore the events data is used from BigQuery Workspace Logs. For those unfamiliar Google Workspace Admins on supported editions of Workspace can setup a streaming export of activity data to BigQuery. This can be incredibly useful in situations where you need to review audit and usage data and in this scenario use it to restore data.

Source: Ghislain Sanjuan on LinkedIn: Google Admin and the raiders of the lost calendar

Creating your own Google Calendar Assistant with Google Apps Script and the Google Speech to Text, ChatGPT and Google Chat APIs

 

Image credit: Stéphane Giron

Have you ever wished for a personal assistant who could give you a quick summary of your day’s events while you’re busy getting ready in the morning? I worked on a Google Apps Script that does just that! By collecting events from in Google Calendar, generating a summary using ChatGPT, and creating a voice file with Google Text to Speech, the script will send a daily summary straight to their Google Chat Spaces.

Not surprising given the current interest in generative AI to see more examples emerging from the Google Workspace developer community. This latest example comes from Stéphane Giron who shares how he is able to recreate some Google Assistant functionality with Google Apps Script and calls to the ChatGPT and Google Cloud Text to Speech services. All the main code snippets from this project are available in the source post link.

Source: How I created a Calendar Assistant with Google Apps Script that automates a daily voice summary…

Delete Google Calendar Events by keyword and date range

Search a date range in Google Calendar and match any events with a given string, then delete those events.

Search for and delete Google Calendar events

Search for and delete Google Calendar events

The following Google Apps Script is designed to search a date range for Google Calendar events containing a given string (something to help target those events) and then delete them.

There are 4 items at the beginning of the script to complete for your requirements:

  1. Start date – format mm/dd/yyyy – forms the date range to look for events within.
  2. End date – format mm/dd/yyyy – forms the date range to look for events within.
  3. Search string – bit of text that is unique to the events you wish to delete to differentiate them from other Calendar events you may not wish to remove. Note: is not case-sensitive and will not pick-up search string inside of another word eg ‘the’ in ‘there’.
  4. Calendar ID – typically your email address for your personal Google Calendar to search for events in.

Source: The Gift of Script: Delete Google Calendar Events by keyword and date range

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

📅 A free and open source Google Apps Script web app to make it easy for others to schedule with you

📅 A free and open source web app to make it easy for others to schedule with you –

Features

  • 🌐 Create a unique link that others can use to book an appointment on your Google Calendar
  • 📑 Offer mulitple types of meetings, each with their own configurable timeframe and event settings
  • 📒 Place events on any calendar you have edit access to
  • 📆 Confirm availability against multiple calendars
  • 🤖 Intelligent suggestion of available free times on both your and (if accessible) the scheduling party’s calendar
  • 🔗 URL parameters to bring the user to a specific meeting type and prefill their email1
  • ⚡ Send a webhook push to integrate with IFTTTZapier, and more when an event is scheduled
  • 🌈 Configurable accent color
  • 🌙 Automatic light and dark mode
  • 💳 No premium tier. 100% free.

This Apps Script solution comes thanks to a tweet from Sourabh Choraria (@choraria) highlighting a open source project from Leo Herzog which lets to deploy a highly customisable Google Calendar appointment scheduling app. The solution uses a nice JavaScript library for handling dates/times which you might find useful to include in your own projects called Luxon.

There are some interesting approaches used in this project like checking if there is a newer version of the source code on GitHub. The Luxon library is also fetched/cached and inserted using eval() – the Mozilla MDN web docs have some notes on alternatives to eval() and in the case of Luxon as shown in this Apps Script example you can drop the library into a script file and use it in your code.

Source: GitHub – leoherzog/ScheduleQuest: 📅 A free and open source web app to make it easy for others to schedule with you

Create an Out Of Office event in Google Calendar with Google Apps Script

🏝 It’s finally summer break! We all wish we could create Out Of Office events in Calendar using Google Workspace #AppsScript (I know you do). But Calendar API is yet not allowing us to do so.

This post from Dararath BEAUVOIR is a great reminder that in Google Workspace/Apps Script development that you occasionally need to look beyond the built-in services like CalendarApp to the Advance Service equivalents. In this case Calendar.CalendarList.list is used because unlike CalendarApp using the Advanced Service the event response indicated if the eventType is out-of-office. More details are included in the source post.

Source: Create an Out Of Office event in Calendar with Google Apps Script

Hackaday Prize 2022: BinPal – A convenient recycling reminder

While curbside pickup of recyclables is convenient, it does require you to keep track of which type of waste is picked up when: miss the biweekly paper pickup and you’ll soon find yourself stockpiling four weeks’ worth of boxes and newspapers. When [Dominic Buchstaller]’s stack of cardboard began to reach his ceiling, he decided to take action by building himself BinPal: a fridge magnet that helps you remember when to take out which bin.

At heart of the simple but effective BinPal is an ESP32 board that connects to Google Apps Script and retrieves the pickup schedule from Google Calendar. If one of four categories of waste is due for pickup, its icon is highlighted on an LCD screen.

BinPal is an entry to the 2022 Hackday Prize which uses Google Apps Script to return Google Calendar data to an IoT device. The project page for BinPal has instructions and all the files to remake, including the file for laser-cutting/engraving the front plate. Browsing the Apps Script file for the project you’ll see it is a basic web app which returns data from a named calendar. Hackday challenges are open for set dates throughout the year so there is still a chance to submit your own projects – visit hackaday.io/prize for more info.

Source: Hackaday Prize 2022: BinPal Is A Convenient Recycling Reminder

How to schedule a meeting in Google Meet with Apps Script – Digital Inspiration

Learn how to setup a video meeting inside Google Meet with the Google Calendar API and Apps Script. This Apps Script sample shows how you can programmatically schedule video meetings inside Google Meet with one or more participants using the Google Calendar API. It can be useful for teachers who wish to schedule regular meetings with their students but instead of manually creating meeting invites, they can easily automate the whole process for the entire class.

We’ve featured a couple of Google Meet scheduling solutions in Pulse[1,2]. This latest example from Amit Agarwal includes some nice code examples for additional optional parameters that can be used when using Google Calendar as an Advanced Service (Calendar.Events.insert). These include:

  • attendees[].responseStatus – for setting the attendee’s response status;
  • reminders.overrides[] – to override default event reminders and pops; and
  • recurrence[] – creating a custom recurrence for the calendar event

Amit includes some very useful examples of recurrence rules, using the RRULE notation. As well as RRULE the recurrence property can also accept RDATE and EXDATE values for further occurrence customisation.

Source: How to Schedule a Meeting in Google Meet with Apps Script – Digital Inspiration

  1. Phil Bainbridge’s Bulk create Google Calendar events with optional Meet or Zoom
  2. Luke Craig’s Using Google Apps Script to schedule Google Meets for a Virtual Parents’ Evening Assistant

See your Google Calendar events in Google Maps using Google Apps Script

Image credit: KEVIN VAGHASIYA

In this article, I will show you how can you visualize google calendar events in the google maps using Google Calendar, Maps Javascript API, HTML, CSS and Google Apps Script.

This is an interesting project shared by Kevin Vaghasiya which uses Google Apps Script to create a web app to display a range of Google Calendar events on a map. On the backend the script is using the Maps Service and geocode(address) to get the co-ordinates of the event location. This could be an interesting project to modify to send yourself a daily email with a static map image of your appointments.

Source: See your calendar events in Google Maps using Google Apps Script