3

can someone please explain the parameters that need to be provided when creating a direct link to add a Google calender event

http://www.google.com/calendar/event?action=TEMPLATE&text=[event-title]&dates=[start-custom format='Ymd\THi00\Z']/[end-custom format='Ymd\THi00\Z']&details=[description]&location=[location]&trp=false&sprop=&sprop=name:" target="_blank" rel="nofollow"

I tried from https://support.google.com/calendar/answer/3033039 but nothing is working there.

I specially want to know how the date and time is formatted and in 'Ymd\THi00\Z'.

alexanderbird
  • 3,847
  • 1
  • 26
  • 35
Priyanka
  • 81
  • 1
  • 6
  • related: http://stackoverflow.com/questions/10488831/link-to-add-to-google-calendar – alexanderbird Jan 15 '16 at 21:06
  • AHA! Someone asking for documentation on the parameters gives a full example http://stackoverflow.com/questions/22757908/google-calendar-render-action-template-parameter-documentation – alexanderbird Jan 15 '16 at 21:16
  • [Here's the answer](https://stackoverflow.com/a/21653600/199374) for specifying times. – Alan M. Jun 01 '17 at 00:36

1 Answers1

3

I haven't figured out how to set event times. But, for an all day event, here's an example.

Suppose you want to create the following event:

  • name: Fun Party
  • location: North Pole
  • description: bring your parka
  • start: Dec 26, 2016
  • end: Dec 29, 2016

The link would be:

http://www.google.com/calendar/event?
action=TEMPLATE
&text=Fun%20Party
&dates=20161226/20161230
&details=bring%20your%20parka
&location=North%20Pole

Note the url encoding of spaces, etc.

demo - add to Google Calendar

alexanderbird
  • 3,847
  • 1
  • 26
  • 35