Build a Google Calendar Link

I recently created an event website and needed to create links for people to add the events to their calendars—the documentation for how to do this for Google Cloud is a mess, so here’s what I eventually worked out.

Start with: https://www.google.com/calendar/render?action=TEMPLATE

Now, each piece we’ll add is an additional parameter:

  1. Title is specified as text, so append that to the URL if you want that. For example, if I wanted the title to be Welcome, I would add &text=Welcome, e.g.: https://www.google.com/calendar/render?action=TEMPLATE&text=Welcome

  2. Date/Time is next, starting with the keyword dates. Here, we specify the date as YYYYMMDD (e.g., 1 July 2022 is 20220701), and times are formatted as HHMMSS (e.g., 8:30 AM is 083000). The date and time are separated with the letter T, and the start and end pieces are separated with /. For example, if the Welcome event starts at 8:30 AM on 1 July 2022 and ends at 10 AM, the value would be: 20220701T083000/20220701T100000

  3. Timezone is optional—without it, you get GMT. If you want to specify a timezone, use ctz, and the value is a tz database entry. For example, if you want South Africa, it would be: Africa/Johannesburg

  4. Location is also optional and uses the key location with free-form text. If we put the above example together, we get:

    https://www.google.com/calendar/render?action=TEMPLATE&text=Welcome&dates=20220701T083000/20220701T100000&ctz=Africa/Johannesburg&location=Boardroom
    

Notes: