10

I have a website that stores and displays data about events. I'd like to make that data available to Google Calendar users and allow them to subscribe to my site's event data. The event data can and does change occasionally, so having user's import an iCal file to their own Google Calendar is not ideal.

  1. Is this possible?

  2. Can I keep all of the data on my site, via a URL, and allow Google Calendar users to subscribe?

  3. Do I need to put my event data "into Google" somehow, and then allow Google Calendar users to subscribe to that data? If so, I'll need to keep event data on my site and the data "in google" in sync, correct?

2 Answers 2

12

If you publish an iCal/xCal file to your website then your users can subscribe to this using Google Calendar. In the Calendar UI its under Settings->Browse Interesting Calendars->Add by URL.

This causes Google to internally create a new Google calendar and arrange for it be populated with new events from your feed regularly (at least once every 24 hours). To add new events you simply upload/publish a new version of your calendar file.

If its a bit much to ask your users to follow this method, then you can publish a "subscribe to calendar" link or button on your website. The link should be:

http://www.google.com/calendar/render?cid=http://location-of-calendar-file

Or for Apps:

http://www.google.com/calendar/hosted/somedomain.com/render?cid=http://location-of-calendar-file

Google used to have this information in a support document but I can't find it anymore :( I can verify that this method works well - we publish personalized feeds for 150K users right now.

4
  • Just what I was looking for! Feb 28, 2015 at 19:48
  • Under "Add using a link" it says "Note: It might take up to 12 hours for changes to show in your Google Calendar." support.google.com/calendar/answer/…
    – andynu
    Jul 7, 2017 at 19:25
  • Please also note, as of writing this, that this only works for http URLs and not https. The error alert inside Google Calendar when using https is “Sorry. This email address isn't associated with an active Google Calendar account”. Jul 12, 2018 at 6:06
  • 1
    Google now requires that you use the webcal:// protocol instead of http:// or https://.
    – Ben Davis
    Jul 20, 2021 at 15:07
1

As long as your calendar is public, you can go to the calendar settings and copy the "Calendar Address" that it provides in XML, ICAL, and HTML format and post that somewhere on your site. Users should be able to use that URL directly inside Google Calendar to import yours into their interface.

6
  • 1
    Is that a one time import, or if the XML/ICAL/HTML data changes, will that update calendars for users that linked to this page?
    – slolife
    Jun 30, 2010 at 23:02
  • Once imported, if you update your calendar it will update for them as well. The link is actually used to add your calendar as an "Other Calendar" to their Google calendar interface as if you had directly shared the calendar to them. Jun 30, 2010 at 23:08
  • 1
    This is correct, but it does require the data to exist as a google calendar -- either via some sort of sync or via direct input. Jul 1, 2010 at 1:15
  • whoops! I must have missed the part where the slolife didn't mention already using Google Calendar. Adam is right, Google calendar would be needed on both ends of this for it to work that way. Jul 1, 2010 at 12:26
  • So, since my data needs to exist in a google calendar, I'll need a google account for my site, and I'll need to keep the event data in the google calendar in sync with the data on my site.
    – slolife
    Jul 1, 2010 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.