Tuesday, January 11, 2011

Merging Two Google Calendars

I regularly use Mail for Exchange to sync my phone with my Google Calendar account. It's awfully useful but there's one catch : you can't set it up to sync with two google calendars. It'll always sync only your primary calendar.

Now, I have a personal calendar with entries for my classes etc. Apart from that, I have also subscribed to another public calendar for keeping track of the activities organized by various clubs of IISER Kolkata. But the default-calendar-only policy of Mail for Exchange meant I was unable to get the second calendar to sync with my phone.

I googled for finding some solution for the issue, but it didn't yield any useful information. I had almost given up when I came across a not so well-known service from google called Google Apps Script. As the name suggests, It lets you run scripts written in JavaScript on google's server and the script can access many of google's popular services, including calendar.

That solved my problem completely. All I needed was a script which will add all the events of the second calendar to the primary calendar, with some background checks to avoid adding duplicate entries. That was pretty easy: as per google's standards, the documentation was excellent, with ample examples too. So I had a working version of the script ready within very little time.

The code:

You can add triggers for the script as well. I added a daily trigger, so it will run once a day and sync the secondary calendar. Problem solved!


  1. This was really useful, thanks! Don't suppose you've updated this to remove events from your calendar that have been removed from the other calendar?


  2. Great code, very useful - however it tends to duplicate full day events - would you have any indication as how to fix this?

  3. The quick technical specifications of this gucci replica Phablet by LG may be compared by chanel replica Galaxy Note:139.6 x 90.4 x 8.5mm in resolution which makes it wider and thinner than Samsung Galaxy Note.5-inch replica handbags (1024 x 768) IPS display with 256 PPI screen density makes the Galaxy Note winner with just 3 inches hermes outlet. LG Optimus Vu would be available next month but with the uncertainty of price.

    A simple observer may find Optimus not so fendi outlet beautiful and stylish, as Galaxy rolex submariner replica Note is, but I find it a little better though gucci replica the users with aesthetic senses may love Galaxy Note to be the better choice.

  4. I always love to read informative books and it sounds good to read your post where you are introducing some new books. I will buy these books and add them to my sleeping time study. All the students who are worried about writing assignments can Discover More Here as well as get their assignments prepared within deadlines and at cheap price.

  5. Cool artical!)) Realy I like it! By the way, do you want to know about the best way in education? ! It is save your money and you mood! Essay help!) It is my secret!!!!

  6. Awesome code! I have been trying on and off for a couple years now to write something like this. I modified it with an array to copy multiple calendars, but this is awesome!!! Thank you for sharing the code.
    I am going to look into adding support for deleting events deleted on the primary calendar. If I get that running I will put it on my blog and let you know.

    Thanks again!

  7. Rankings thus strongly constrain their purposeful options, despite such actors being formally free to set their own courses of action. Yet these very practices then ensure the social reproduction of such structures as key universalizing models. buy custom essays online

  8. Omega is an affluence watchmaker based out of
    louis vuitton replica Switzerland whose on the internet autograph are world-renowned for their adorableness and aloft top quality. Founded at La Chaux-de-Fonds, Switzerland in 1848 by Louis Brandt, Omega is beat by abounding of the lot of replica shoes affecting humans today. Presidents, actors and acclimatized icons are consistently aboveboard adorning their wrists with Omega watches. Louis Brandt initially bought places for gucci replica his key-wound assimilation abridged Replique Montre Rolex from belted craftsman. Afterwards his death, yet, his two sons acquainted a centralized adeptness action would after-effects academy aloft merchandise. This would serve as the alpha of Omega’s prominence. It was abandoned a abbreviate accumulated of time afterwards that the action became an industry regular.Each of Brandt’s sons, Louis-Paul and C?sar, anesthetized abroad in 1903 bequeathing their dior replica advantage to four youths (the oldest accepting 23). At this time, 240,000 watches had been produced celebration year by a agents of 800. The new owners, accepting their youth, affiliated to acclamation the accession and by the seventies, it had about-face into the third abettor of able watches aural the angel (and accumulated one accurate in Switzerland). Sad to say, Omega faced acerbic cyberbanking challenges throughout the bread-and-butter recession amidst 1975 and 1980 and had to become bailed out in 1981. There were talks of a abeyant get out from Seiko, a advancing watch manufacturer, but abolishment came to fruition. Rather, afterwards years of cyberbanking restructuring and accession mergers, the Swatch Group was formed in 1998 and is now the sole artisan of
    http://www.enjoywarwickshire.co.uk and added watch brands.

  9. This is where the need for additional reading cloud-based technology becomes necessary. The school automation software is there to improve productivity providing all types of schools with smart and effective methods of administration

  10. ralph lauren shirts, http://www.poloralphlaurenshirts.us.com/
    oakley, http://www.occhialioakleyoutlets.it/
    ray ban, http://www.occhiali-rayban.it/
    oakley outlet, http://www.oakleyoutlet.in.net/
    oakley sunglasses, http://www.oakleysunglasses-outlet.us.com/
    kobe bryant shoes, http://www.kobebryantshoes.in.net/
    pandora jewelry, http://www.pandorajewelryoutlet.us.com/
    cheap nike shoes, http://www.cheap-nikeshoes.cc/
    hollister uk, http://www.hollistershirts.co.uk/
    hermes belt, http://www.hermesbelts.us/
    cheap wedding dresses, http://www.cheap-weddingdresses.net/
    coach outlet canada, http://www.coachoutletcanada.com.co/
    cheap jordans, http://www.cheapjordanshoes.in.net/
    north face outlet, http://www.thenorthface.me/
    oakley sunglasses, http://www.oakleysunglassesdiscount.us.com/
    louis vuitton handbags, http://www.louisvuittonhandbags.org.uk/
    soccer jerseys, http://www.soccerjerseys.us.com/
    cheap nfl jerseys, http://www.cheapnfljerseys.org/
    juicy couture outlet, http://www.juicycoutureoutlet.net/
    the north face clearance, http://www.thenorthfaceclearances.us.com/
    chanel handbags, http://www.chanelhandbagsoutlet.in.net/
    yoga pants, http://www.yogapants.us.com/
    futbol baratas, http://www.futbol-baratas.com/
    prada handbags, http://www.pradahandbagsoutlet.co.uk/
    air jordan 13, http://www.airjordan13s.com/

  11. Google is a most famous and beneficent search engine and we can search sites by google easily for best assignment writing service of any other purpose. There are a lot of services of google and i am very thankful for services that provided us by google.

  12. Get Latest Updates of Entertainment, News
    ALL the govt job, university exam, SSC , UPSC Results are available here, UP Police Recruitment, CG Police Job

  13. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.I’ll use this information for my essays.


  14. If you want to know What is National Cat Day and why is it celebrated by pet lovers all across the globe,
    just have a look at my blog.
    You too can celebrate this day with your loving pet cat.

  15. To wish your beloved with glorious quotas,wonderful images in the New Year 2017.

  16. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi

  17. This comment has been removed by the author.

  18. I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me.

    geometry dash pc, geometry Dash, geometry dash lite, geometry dash play, geometry dash online

  19. Mostly people have all the same things when they are writing academic task or any other writing, especially light music most people like during the writing.

    subway surf , baixar subway surf, subway surf download , download subway surf

  20. You need to have time to take care of the active. It in fact was a amusement account it. Look advanced to far added agreeable from you.

    entrar hotmail agora , hotmail entrar, entrar hotmail , entrar no hotmail

  21. Mostly people have all the same things when they are writing academic task or any other writing, especially light music most people like during the writing.
    facebook iniciar sesión , facebook, iniciar sesion , iniciar sesion facebook

  22. Life becomes more interesting and wonderful when you share your memorable moments with friends and family through unique photographs. You can create your own unique style impressed with image editing software. And after hours of work stress you can also
    Download Musicas, Baixar Musicas Gratis ,Baixar Musicas Gratis, Baixar Musicas

  23. Mostly people have all the same things when they are writing academic task or any other writing, especially light music most people like during the writing.
    dream league soccer download , dream league soccer apk , download dream league soccer , dream league soccer

  24. Life becomes more interesting and wonderful when you share your memorable moments with friends and family through unique photographs. You can create your own unique style impressed with image editing software. And after hours of work stress you can also

    whatsapp messenger
    baixar whatsapp
    whatsapp plus
    download whatsapp
    whatsapp baixar

  25. You need to have time to take care of the active. It in fact was a amusement account it. Look advanced to far added agreeable from you.

    baixar banana kong , banana kong , download banana kong , banana kong download , banana kong

  26. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.I actually appreciate your own position and I will be sure to come back here.
    outlook iniciar sesión l iniciar sesión outlook l outlook l iniciar sesión

  27. Nice! thank you so much! Thank you for sharing. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.I actually appreciate your own position and I will be sure to come back here.
    facebook entrar l entrar facebook l entrar no facebook l entrar facebook direto l entrar facebook agora

  28. Thanks To Watch IPL 2017 Live Stream.One of the most entertaining cricket league IPL .to watch the live steaming click on link below

    Watch IPL 2017 Live Stream

    IPL 2017 Points Table

  29. I like to get up early to go out and breathe fresh air. I feel that it is good for health and a good habit

  30. I have read this above post its very nice for us thanks sharing ,great post.


  31. Packers and Movers Chennai Give Safe and Reliable ***Household Shifting Services in Chennai with Reasonable ###Packers and Movers Price Quotation. We Provide Household Shifting, Office Relocation, ✔✔✔Local and Domestic Transportation Services, Affordable and Reliable Shifting Service Charges @
    Packers And Movers Chennai

  32. Hire Best Packers And Movers Mumbai for hassle-free Household Shifting, ***Office Relocation, ###Car Transporation, Loading Unloading, packing Unpacking at affordable Price Quotation. Top Rated, Safe and Secure Service Providers who can help you with 24x7 and make sure a Untroubled Relocation Services at Cheapest/Lowest Rate @ Packers And Movers Mumbai

  33. Божественно креативные и поразительно точнейшие онлайн гадания для познания нашего дня грядущего, это исключительно то, что вы увидите на страницах нашего сайта. Гадание на игральных оказывается самым быстрым и легким инструментом для извлечения жизненных знаний из ментального поля Земли.

  34. Religion coursework writing services are very common nowadays since there are very many students seeking Religion Assignment Writing Services and religion essay writing services.

  35. Предлагаем вам рассмотреть публикацию лучшие смартфоны до 30000 , которая поможет идентифицировать идеальную электронику. Современному покупателю придется понимать огромное множество технологических форматов. Информационный вебпортал о телевизорах и мониторах, и иных новомодных электронных устройствах "Reyting Elektroniki" помогает всем клиентам определиться в не легком выборе при выборе актуальной техники.

  36. Thanks on your marvelous posting! I really enjoyed reading it, you’re a great author.Please visit here:
    Local Packers And Movers Bangalore

  37. Если только вы приняли решение отправиться в дорогу на большое расстояние, наиболее рационально использовать именно поезд и купить жд билеты Казань Бугульма. Когда сравниваешь стоимость перемещения относительно преодоленного поездом расстояния, то, разумеется, езда поездом станет максимально низко затратной. Незначительная стоимость билетов обеспечивается вследствие сплошного транзитного движения пассажиров - один клиент оставляет вагон на требуемой остановке, его сиденье занимает последующий клиент железнодорожного транспорта. Большинство людей ставят уют движения выше любых других требований. Ездить на поезде намного удобнее, чем машиной. Всякий клиент положительно оценит установку в железнодорожном транспорте комфортабельных купе, зарядки для смартфонов, чистые туалеты и большое пространство состава, используемое для непродолжительных походов во время перемещения.

  38. Достоверные инструкции о применении слотов здесь https://japancasino-x.com/%e3%82%ab%e3%82%b8%e3%83%8ex%e3%83%95%e3%83%aa%e3%83%bc%e3%82%b9%e3%83%94%e3%83%b3/. Играйте в удобное время на вашем устройстве, не покидая своего офиса. Без особых усилий вращайте колесо, и судьба в обязательном порядке улыбнется вам! Бонус и кручения барабана при регистрации.

  39. Packers and Movers Pune Provide High Quality ***Household Shifting, Home/Office Relocation, Insurance, Packing, Loading, ###Car Transportation Service Pune and High experiences, Top Rated, Safe and Reliable, Best and Secure Packers and Movers Pune Team List. Get ✔✔✔Affordable Rate Charts and Compare Quotation and Save Money and Time @ Packers And Movers Pune

  40. Различные версии ворожбы именуются как астральные науки. Каждый характер предсказания судьбы исключителен и предназначается для различных задач. Гадание на картах Таро на знакомства и истинность ворожбы в основном зависит от практики гадающего. Всякий мыслит узнать собственное грядущее и считает конкретные виды гадания по максимуму достоверными.

  41. Thank you very much for writing such an interesting article on this topic. This has really made me think and I hope to read more. @ Packers and Movers mumbai

  42. Local Packers and Movers Bangalore List, Get Best Price Quotes, Compare Movers and packers Charges, Top, Local Household Shifting Services @ Packers And Movers Bangalore

  43. Треккер платформа задействуется в фоновом порядке и не "съедает" вычислительные энергоресурсы компа. Не нужно расходовать деньги на покупку лицензии с новейшей игрой. Всего лишь несколько лет назад качественная игрушка появлялась исключительно в брендовых магазинах. На данный момент какую угодно игрушку можно приобрести в интернете на специальных сайтах. Специфической чертой tracker систем считается право свободной загрузки архивов различных размеров. Качнуть требуемую игрушку реально в рекордно короткий срок - скорость отклика треккер хостинга не на шутку велика, например тут скачать русские полные игры. Приоритетные запросы игры не смогут испугать современных гиков.

  44. Thank you for the helpful article. I recommend paying attention to my site, https://youtube-to-mp3-converter.com/. With it, you can easily download any music from Youtube to your phone.

  45. Get Packers and Movers Jaipur List of Top Reliable, 100% Affordable, Verified and Secured Service Provider. Get Free ###Packers and Movers Jaipur Price Quotation instantly and Save Cost and Time. Packers and Movers Jaipur ✔✔✔Reviews and Compare Charges for household Shifting, Home/Office Relocation, ***Car Transportation, Pet Relocation, Bike SHifting @
    Packers And Movers Jaipur

  46. Только по интерактивным площадкам, например эротический чат fedora69 - вы имеете возможность изображать своего сексуального партнера кем захотите. Девочку разрешено без проблем приодеть в какой-то неприличный ливчик. Эксплуатация разных забавных вещей непременно углубит следствие вебкам соития. Особо грязные намерения реально реализовать пусть даже с неизвестным человеком. Вы с легкостью сможете лишиться комплексов. Мужчины способны попробовать что-то новое, а нимфы с охоткой покажут собственные бюсты.

  47. I must say you had done a tremendous job,I appreciate all your efforts.Thanks alot for your writings......@ Packers and Movers Ahmedabad

  48. Немалый выбор оборудования для сферы жилищно-коммунального хозяйства. Воспользуйтесь максимальными преимуществами только на сайте купить детский спортивно игровой комплекс. Далее рассмотрены глобальные плюсы сотрудничества с данной фирмой.