Project - Google Calendar Integration
Since starting Better Simple, I have integrated a few web applications with Google Calendar. They all required the system to import events from Google Calendar into the web application and then export the appointments from the web application into the users’ Google Calendars. The benefit of this was that it allowed the users to manage their calendars via their phone. It also potentially allowed the web applications to integrate with other web applications by using Google Calendar as the medium of communication. While it may seem relatively simple from the outside, it’s actually a very elegant integration.
Typically the integrations will be setup so that the user follows the following flow:
- User chooses to integrate their Google Calendar into the application.
- User is redirected to Google to grant permission so the application can access the calendar data.
- The system begins “watching” one or more of the users’ calendars.
- The system exports all existing future appointments to the user’s Google Calendar.
- The system imports all existing future events from the user’s Google Calendar into the application.
The nifty part about this integration with Google Calendar is that Google’s API will actually call the web application when there’s a change to the calendar. What this means is that when there’s a change to the user’s calendar, Google’s servers will notify the application that something’s happened. This is a benefit because otherwise the application would have to check in with Google’s servers every couple of hours (something called polling). This allows the application to only make calls out to Google when it’s needed and it actually gets the data into the application faster than it would with polling.
This is a common integration that I’ve done on a number of projects and I suspect that I will do it on more in the future. If you have any questions about the technical details of this integration or would like to know if it’s feasible for your application, please let me know!