Thursday, June 4, 2009

Making a Google Calendar link

There is a handy form available under Google help to create a website button for a calendar event (http://www.google.com/googlecalendar/event_publisher_guide.html). It is pretty useful but I needed to decode the parameters in order to get some javascript to create a particular link on demand. Here's my notes about the parameters you can play with.

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

7 comments:

Leon M said...

I can't figure out where the sprop parameter shows up in the actual event. The parameters output=xml and sf=true are added to my link as well when I click on it.

Anyone have any ideas?

Dum said...

try changing the order of the parameters:

https://www.google.com/calendar/render?action=TEMPLATE
&text=Your+text
&dates=20140812T120000/20140812T130000
&details=AIXO_ES_UNA_PROVA_DE_CALENDAR:%0A%0Ahttp://www.tuordenador.com
&location=Tenor+Masini+79+barcelona
&trp=false
&sprop=http://www.tuordenador.com/
&sprop=name:Magic+World+Informatica+SL.
&sf=true
&output=xml
&src=your.calendar.email+account

it seems it works fine!

Gigit F. said...

Hi to all.
I tried all these suggestions and they run well, but is it possibile to do it silently? I mean that passing the url, Calendar opens and waits for you to save the event. I would prefer it does not. Many Thanks.
Gigit

ys said...

I've made a tool based on your document. If you are interested, please check it out!

Google Calendar Event Registration Tool
- https://github.com/yukishimazu/gcalevent
- http://output.jsbin.com/xujuluw

guilloip said...

Do you have any idea how to set the alarm trigger this way?
I am going crazy trying to find out googleing all day, but not answer found.

Unknown said...

Hi!

How to add the parameter "guestsCanModify"?. I've tried the following with not success "&guestsCanModify=true". Any ideas?

Anonymous said...

Hi

Can anyone help me on how to set calendar notification programmatically. By default its 10 minutes, I want to set it 0 minute.
Any help will be surely appreciated.