Tuesday, 16 March 2021

Create a Google Calendar Event via the Calendar API

The following Google Apps Script is designed to create a single Google Calendar event via the Calendar API. I've been recently developing a tool to bulk create Calendar events from a Google Sheet but before that I needed to learn the necessary formatting/structure to be able to send details to the Calendar API.

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.

Structure of the event:

  • ID of the Calendar to create the events in (typically an email address).
  • Summary - title of the event.
  • Description.
  • Location.
  • Start/End Date/Time.
  • Google Meet conferencing.
  • Attendees - guests invited to the event.
  • Send updates - email invitations to attendees.
  • Guests can invite others.
  • Guests can modify the event.
  • Guests can see other guests.
  • Show Me As - your availability during the event (eg busy).
  • Event visibility - eg private or public.



Create a Google Calendar Event via the Calendar API download (please use 'File' > 'Make a copy' for your own version).


No comments:

Post a comment