78

We can use this link to add a new event to Google Calendar by parameters

https://www.google.com/calendar/render?
action=TEMPLATE&
text=EventName&
dates=20131206T050000Z/20131208T060000Z
&location=EventLocation&
sprop=name:Name&
sprop=website:EventWebite&
details=EventDetail&
sf=true&
output=xml

But I can't find any documentation about these parameters.

Does anyone know where's it?

Bruno Leveque
  • 2,647
  • 2
  • 23
  • 33
Huei Tan
  • 2,237
  • 3
  • 23
  • 34

4 Answers4

81

Explanation about the available parameters:

anchor address:
http://www.google.com/calendar/event?
This is the base of the address before the parameters below.


action:
    action=TEMPLATE
    A default required parameter.
    
src:
    Example: src=default%40gmail.com
    Format: src=text
    This is not covered by Google help but is an optional parameter
    in order to add an event to a shared calendar rather than a user's default.
    
text:
    Example: text=Garden%20Waste%20Collection
    Format: text=text
    This is a required parameter giving the event title.
    
dates:
    Example: dates=20090621T063000Z/20090621T080000Z 
           (i.e. an event on 21 June 2009 from 7.30am to 9.0am 
            British Summer Time (=GMT+1)).
    Format: dates=YYYYMMDDToHHMMSSZ/YYYYMMDDToHHMMSSZ
           This required parameter gives the start and end dates and times
           (in Greenwich Mean Time) for the event.
    
location:
    Example: location=Home
    Format: location=text
    The obvious location field.
    
trp:
    Example: trp=false
    Format: trp=true/false
    Show event as busy (true) or available (false)
    
sprop:
    Example: sprop=http%3A%2F%2Fwww.me.org
    Example: sprop=name:Home%20Page
    Format: sprop=website and/or sprop=name:website_name

add:
    Example: add=default%40gmail.com
    Format:  add=guest email addresses

details: (extra)
    Example: details=Event%20multiline%0Adetails
    Format:  details=description text (google also accepts html in this text)

http://useroffline.blogspot.com/2009/06/making-google-calendar-link.html

Stalinko
  • 3,319
  • 28
  • 31
snoopy_15
  • 1,273
  • 4
  • 18
  • 31
  • Is it deprecated now? Or is working? Because this worked for me but now stop working... – Aral Roca Oct 07 '15 at 08:43
  • 7
    These parameters still work. To help a little, `trp` stands for what RFC 5545 calls "transparency". The values described above seem backward to me, but Google does their own thing. You can also pass a URL-encoded RRULE or RDATE property with value (*e.g.*, a URL-encoded version of `RRULE:FREQ=MONTHLY;BYDAY=2SU` would repeat monthly on the second Sunday) via the `recur` parameter to set recurring events. – Paul Rowe Dec 16 '15 at 18:41
  • 7
    The dates can also be given without times - eg `dates=20090621/20090621`. Google Calendar will interpret this as an all-day event. – Nathan Long Jul 26 '16 at 13:33
  • 2
    There is an additional field `details`, which allows you to specify the description of the event (event body text). – Benedikt Köppel Nov 01 '16 at 08:50
  • `https://www.google.com/calendar/render?action=TEMPLATE&text=EventName&dates=20170101/20170101 &location=EventLocation&recur=RDATE:20170202T010000Z` I can't seem to be able to get RDATE working... any hints? – Billy Jan 03 '17 at 23:58
  • can we link to the site directly without redirecting to `action=TEMPLATE` ? – Varshini Sep 08 '17 at 13:53
  • &authuser=xyz@gmail.com will allow you to select the specific gmail account. Helpful if you're logged in to multiple Gmail accounts in the browser and you want to add the calendar event to a specific account. – Abdulgood89 May 17 '19 at 17:36
  • 2
    Does anyone know if there's a parameter that exists to add a reminder or multiple reminders? – Abdulgood89 May 18 '19 at 18:53
  • 2
    Ok i've been investigating this for a few days now and it looks like adding a reminder through the URL is not possible for Google Calendar. This setting is in calendar.google.com settings -> Settings -> Select desired Calendar on the left side -> Event notifications. Every Google Calendar event afterwards created for that Calendar will have the same notification settings. – Abdulgood89 May 18 '19 at 22:39
  • `details` field also accepts some basic HTML tags like ``, ``, `
    ` etc
    – Stalinko Jun 25 '20 at 08:25
  • @Abdulgood89 I created a custom calendar with default notification settings. When create a custom calendar event link with this calendar by default, its default notification settings were picked up properly, and I received an e-mail before this event occurs. That worked for years. But, for some reason, recently this approach stopped working. I checked the custom calendar settings, and everything seemed to be OK. The default calendar was selected, but its notification was not added to the events... Maybe, anybody faced with this issue as well and found the solution to it? Thanks in advance... – Exterminator13 May 23 '21 at 15:16
  • What about adding link to Meet by default? – Rony Tesler Jul 18 '21 at 22:48
19

The link from snoopy_15's answer points to an old Google URL that is currently being redirected to the new Google support page. This new page does not explain how to generate the kind of link asked in this question.

However, thanks to the wonders of Internet Archive: Wayback Machine, the older pages are still archived and available!

The latest available version is from March 2012, and it includes a form with a simple JavaScript code that still works! Sure, this is not an official documentation (and I'm still looking for one), and this is not even a documentation (it is an interactive form with a script), but it is the closest I could get.

Denilson Sá Maia
  • 47,466
  • 33
  • 109
  • 111
  • 3
    There is a github repo with a list of all known parameters: https://github.com/InteractionDesignFoundation/add-event-to-calendar-docs/blob/master/services/google.md – Alies Jan 13 '19 at 15:04
12

These are the parameters that I use when I create these links. There are other parameters that exist, but I don't find them useful and they are optional. The details about how the dates work are particularly vexing and were never sufficiently documented by google.

  • action=TEMPLATE (required)
  • text (url encoded name of the event)
  • dates (ISO date format, startdate/enddate - must have both start and end time or it won't work. The start and end date can be the same if appropriate.)
    • to use the user's timezone: 20161208T160000/20161208T180000
    • to use global time, convert to UTC, then use 20131208T160000Z/20131208T180000Z
    • all day events, you can use 20161208/20161209 - note that the old google documentation gets it wrong. You must use the following date as the end date for a one day all day event, or +1 day to whatever you want the end date to be.
  • details (url encoded event description/details)
  • location (url encoded location of the event - make sure it's an address google maps can read easily)
squarecandy
  • 4,894
  • 3
  • 34
  • 45
  • This is great! Do you have any idea what the `sf` parameter is for by chance? – jayp Dec 06 '16 at 00:58
  • 1
    I don't know that `sf` does anything, but let us know if you find out via experimentation! Clearly this is not being documented or supported by google any longer, even though it still works for now. – squarecandy Dec 06 '16 at 01:52
  • There was a google documentation page, but it has been taken down. I used to be confused when I first joined SO about how aggressive folks got about link-only answers, but I get it now! – squarecandy Jan 23 '18 at 18:00
4

You have one more param for specifying Guests

Add:
    Example: add=default%40gmail.com
    Format:  add=guest email addresses

Demo

https://productforums.google.com/forum/#!topic/calendar/Ovj6BNTQNL0

Misha Kav
  • 145
  • 1
  • 1
  • 7