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.
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.
If you have tried to seamlessly subscribe a user to a Google Calendar as part of an automation workflow in Google Apps Script and discovered that all that happens is that the user gets an automated email request to join, and then it is up to them to accept the calendar invitation to add it to their live calendar list, you’re in the right place. … How to force subscribe a user in your domain to a Google Calendar using Google Apps Script and Service Accounts.
Scott Donald always crams in lots of very useful tips and guidance in his posts. In this latest piece by Scott you as well as learning about the Google Calendar Advanced Service you can also learn about service accounts and domain wide delegation setup, which enables super powers (and responsibilities). If you are interested in learning more about service accounts in Google Cloud Console Scott has included a selection of other community contributions at the end of his post.
const event = CalendarApp.getEventById('some_event_id');
const guestList = event.getGuestList(true); // get the guest list including owner
// Iterate across EventGuest[]
for (let i = 0; i < guestList.length; i++){
let guest = guestList[i].getEmail();
let status = guestList[i].getGuestStatus().toString();
Logger.log(guest + ' ' + status);
}
However, in practice as the organiser status defaults to ‘Yes’ and can change to ‘No’ or ‘Maybe’ the OWNER status is never returned:
How to solve? Well one solution to find the owner is to get the event guest list with and without the owner then filter out the list ignoring any accounts that appear twice:
const event = CalendarApp.getEventById('some_event_id);
const guestList = event.getGuestList(true); // get the guest list including owner
const guestListWithoutOwner = event.getGuestList(); // get the guest list without the owner
// filter the guest list to ingore duplicate emails leaving only the owner
// based on https://stackoverflow.com/a/42995029/1027723
const owner = guestList.filter(o1 => !guestListWithoutOwner.some(o2 => o1.getEmail() === o2.getEmail()));
Logger.log('The owner is: ' + owner[0].getEmail());
Alternatively if the Calendar Advanced Service is enabled in your Apps Script project the owner email can be returned using:
// With Calendar Advanced Service enabled
// Note: eventId is different to the one returned by CalendarApp as it doesn't include @google.com
// See https://stackoverflow.com/a/55545091/1027723 for how to handle
const event = Calendar.Events.get(CalendarApp.getDefaultCalendar().getId(), 'some_event_id');
Logger.log('The owner is: ' + event.organizer.email);
Clearly the second method is more direct, but which is quicker? I’ll let you tell me :)
I’ve long been interested in using one of the big office productivity platforms to build an embedded add-on. For a solo developer it’s a no-brainer: the platform takes care of the requirements above, and when the platform has a marketplace, there’s even a ready to go distribution channel to take it to market! The only real reason I’ve resisted it so far is fear of the slog of platform approval processes and required collateral. In this story I’ll explain how I felt the fear and did it anyway 😀
Google OAuth verification and Workspace Add-on app review can be quite daunting the first time you go through the process. In this post from Gareth Cronin he shares his own personal journey getting his JIT Time Google Calendar Add-on verified and approved. There are some great tips and resources shared in the post including how to show the OAuth client ID in the add-on demo video submitted as part of the verification processes.
Google Apps Scripts is incredibly powerful and enables complex systems to be built on top of Google Apps. It can be a great choice when you need to quickly prototype an idea or design a solution that’s customizable by non-technical users.
In this article, I will walk through a simple example of building a “Slot Booking System” using Google Sheets, Google Calendar, HTML, Tailwind CSS and Google Apps Script.
Nice little Apps Script project shared in this post using Google Calendar and a published web app, making it possibly a nice starter project for something bigger.
As developers, we often find ourselves weighing up the benefits of automation against the overhead of setting things up. This is true for our personal workflows as well – I often have an idea of how I could automate various arduous tasks, but in reality, it’s difficult to justify doing so.
I ended up going with my gut on this one, and built a ‘calendar sync tool’ that automates the process. It turned out to be 100% worth it – and in this article, I’m going to argue that it’s always worth automating!
This post from Jonny Townend at Brightec is a two-for-one both highlighting the benefits of taking the time to automate workflows and as a bonus sharing a Google Apps Script powered Google Calendar sync tool.
This Google Apps Script allows you to create a Google Calendar event by sending yourself an email in Gmail. Unlike Gmail’s current feature to create Google Calendar events, this script allows you to be on a mobile device.
Use the Calendar API to create an Event via Google Apps Script. Includes a tutorial video.
This is a simple Google Apps Script file that may look lengthy but in actual fact is just each possible item of an event that a user may wish to modify. Some of the items have default values which means you could remove them from the script and the Calendar API would use these defaults instead. My hope is that laying out the format like this allows you to then manipulate as you require and learn as I did.
I use Google Apps Script to support staff and students in my job. I enjoy dabbling with creating tools to help with automation and I freely share my learning experiences on my blog, where I also have a number of useful Google Add-ons: www.pbainbridge.co.uk
I use Google Apps Script to support staff and students in my job. I enjoy dabbling with creating tools to help with automation and I freely share my learning experiences on my blog, where I also have a number of useful Google Add-ons: www.pbainbridge.co.uk