Merging Several Calendar iCal Feeds With Yahoo Pipes

Following up on Displaying Events from Multiple Google Calendars in a Single Embedded Calendar View, and picking up on a quip Jim Groom made in the post that started this thread (“Patrick suggested Yahoo Pipes!, you ever experiment with this? “), I did have a quick play with pipes, and this is what I found..,

The “Fetch Feed” block is happy to accept iCal feeds, as this iCal Merge pipe demonstrates:

(I grabbed the iCal feeds from pages linked to from the Stanford events page. A websearch for “ical lectures events” should pull up other sources;-)

If you import an iCal feed into a Yahoo pipe, you get an iCal output format option:

You can then render this feed in an online calendar such as 30 boxes: pipes merged iCal feeds in 30 boxes (here’s the 30 boxes config page for that calendar).

(NB it’s worth noting that 30 boxes will let you generate a calendar view that will merge up to 3 iCal feeds anyway.)

Using the Pipe’s output iCal URL to try to add the merged calendar feed to Google Calendar didn’t seem to work, but when I converted the URL to a TinyURL (http://tinyurl.com/67bg2d) and used that as the import URL, it worked fine.

Do this:

then this:

and get this:

(I couldn’t get the Yahoo pipe iCal feed to work in iCal on my Mac, nor could I resyndicate the feed from the Google Calendar. I think the problem is with the way the Pipes output URL is constructed… which could be worked around by relaying/republishing the Pipe iCal feed through something with a nice URL, maybe?)

That okay for you, Reverend? :-)

PS having to add the feeds by hand to the pipe is a pain. So how about if we list a set of iCal feeds in an RSS feed (which could be a shared bookmark feed, built around a common tag), then pull that bookmark feed (such as the feed from a delicious page (e.g. http://delicious.com/psychemedia/ical+feedtest)) into a pipe and use it to identify what iCal feeds to pull into the pipe?

Got that? The Loop block grabs the URL for each iCal feed listed in the input RSS feed, and pulls in the corresponding iCal events. It seems to work okay, too:-) That is, the feed powered iCal merge pipe will aggregate events from all the iCal feed listed in the RSS feed that is pulled into the pipe.

So now the workflow, which could possibly be tidied a little, is this:
– bookmark iCal feed URLs to a common somewhere (this can be as weak as shared tags, which are then used as the basis for aggregation of feed URLs);
– take the feed from that common somewhere and pop it into the feed powered iCal merge pipe.
– get the TinyURL of the iCal output from the pipe, and subscribe to it in Google Calendar, (for a personal calendar view).

Hmm… we still can’t publish the Google Calendar though, because we don’t “own” the calendar dates (the iCal feed does)? But I guess we can still use 30boxes as the display surface, and provide a button to add the calendar to Google Calendar?

OKAY – it seems that when you import the feed, it makes sense to tick the box that says “allow other people to find this calendar”:

… because then you can generate some embed code for the calendar, provide a link for anyone else to see the calendar (like this one), and use the tidied up iCal feed that Google calendar now provides to view the calendar in something like iCal:

PPS To make things a little easier, I tweaked the feed powered pipe so now you can just provide it with an RSS feed that points to one or more iCal feeds:

I also added a block to sort the dates in ascending date order. It’s simple enough to add the feed to iGoogle etc, or as a badge in your blog, using the Yahoo Pipes display helper tools:

Hmm, it would be nice if Pipes also offered a “calendar” output view when it knew there was iCal data around, just like it generates a map for when it sniffs geo-data, and a slideshow view when it detects appropriately addressed media objects? Any chance of that, I wonder?

Displaying Events from Multiple Google Calendars in a Single Embedded Calendar View

Of all the things Google Calendar is good for, producing a single embedded calendar from a set of Google Calendars has not been one of them…

[Cue sideaways glance] Or so I thought…

In a flurry of activity earlier today, the Reverend posted this:

while I was admiring the new link to UMW Blogs on the UMW homepage, I clicked on the Events link, and to my surprise it was a Google calendar. Wow! Who knew? When looking at the source code, I released it was actually an aggregation of 10 different Google Calendars–all the more fascinating.

Jim went on: “I did a search for the term “UMW” through Google’s public calendars and found over 40” and the describes subscribing to the calendars, looking at them in the single aggregated view within Google Calendar itself, before hitting a problem: “Google won’t given me an embed code for the aggregation of all of the public calendars I subscribed to around UMW”

Err… rewind one moment… “When looking at the source code, I released it was actually an aggregation of 10 different Google Calendars“…?

This is what Jim saw but didn’t see:

Got it yet?

Take these two calendars, discovered by searching the Public Calendars in Google Calendar:
Snooker Championships Listing (some events are listed over the next four months or so).
Formula One Grand Prix listings for 2009 (the events start during March, 2009).

Now look through to March on this calendar: aggregated calendar view. It shows events from both calendars in the same view.

So what we have here is an aggregated calendar view that can be used to display several (that is, multiple) Google calendar feeds in a single view. To embed the calendar in your own page, just stick it in an iframe.

For each extra calendar feed, just add &src=CALENDAR_ID to the URL. The CALENDAR_ID will probably be of the form:
jabqnchvht5r2pjv0haqlg1j8s%40group.calendar.google.com

PS I did wonder whether I could add the aggregated calendar view as a single calendar to my Google Calendar. It seems not:

That is, it looks like each calendar feed will be added separately, rather than as a single, combined calendar.

But while that would have been a “nice to have”, the ability to display events from multiple Google calendars in a single calendar view in such a straightforward way is probably a big enough win anyway:-)

PPS aren’t comments wonderful (thanks Steve:-) – it seems thaqt you can generate the combined embed code within Google Calendar… Subscribe to the calenders you want to display, then go to the calendar settings:

Select the “Customise the color, size and other options” in the “Embed the Calendar” area:

And then select the calendars you want to include:

Simple:-)