This video cannot be played.
WHOOO!
Hi y’all! At the beginning of this summer, I posted a demonstration of a script that I wrote the syncs your Notion Dashboard with Google Calendar!
There's been a lot of one-way scripts (from GCal to Notion or Notion to GCal) but this is a way for everything to be updated and synchronized together! Unlimited runs of the code (with some built-in protection to keep the notion servers from being overrun) and you're fully in control! This will take about 30-40 minutes to set up (probably faster if you’re just following instructions and not really trying to read through all the explanations).
If you want to support me and this project further, please consider donating here:
(The instructions document seems super long, but it's really a ton of pictures making up most of the pages)
Instructions Here: https://docs.google.com/document/d/1uP-6EsmTlG_Gttg9jC0MBZKHpjccVapIeC1D1tR1yXc/edit?usp=sharing
Sorry for the wait y'all, I was balancing fully "adulting" for the first time and 2 internships this summer, so things were pretty intense.
I chose a document over a video format because it'll be easier to update as I add new features to the program and because it would be more accessible for people. If you really want a video, comment below.
As a self-taught coder/hobbyist and broke Mechanical Engineering/Pre-Med college student, I quickly got frustrated with the limitations of services like Zapier, Automate.io, or IFTTT without dishing out money. Therefore, I decided to make this project open-source and allow anyone, anywhere to have access to the same resources!
The code (written in Python) can be found here: https://github.com/akarri2001/Notion-and-Google-Calendar-2-Way-Sync
The only rules are that you do not make monetary gain from this project and you give me proper credit (unlike code that looks super similar to mine and basically has the same comments copied over). You're free to create videos (with proper credit) if you want, but please do not upload this to a site and charge users for using this code or parts of the code. The entire purpose of this project is to make it accessible.
Current Capabilities:
- Take existing events from your Notion Dashboard and bring them over to Google Calendar
- If the Notion event has only a date, then the GCal event is made at a set time (option to turn this off and have the event be all day instead)
- If the Notion event has a date and time, then the GCal event is made at the appropriate time
- If the event is already in both GCal and Notion, but you switch the date/time on either, it will sync with the new value across both platforms (if both are changed, the value on Notion will overrule).
- If the event is only in GCal, it will be brought over to Notion, as well as the description of the event that you add from GCal.
- When making events, the code will extract the event name, date/time, a category, and text from the Notion Dashboard and integrate that information into your GCal event.
- URL source will also be added to GCal event so you can click on the URL and automatically be brought over to the specific Notion Page that your event is at
- Able to decide default length of new GCal events
- Able to sync end times across both platforms
- Name the required Notion columns whatever you want and have the code work
- Sync across multiple calendars and choose which calendar you would like to sync
- Option to delete gCal events if checked off as “Done” in Notion
Limitations:
- As of now, recurring events are not supported in this program. I will be working on this over the semester. This feature has been pretty hard to implement because of the way that the Google Calendar API returns recurring events. Instead of storing recurring events as a series of events, gCal returns a singular start/end datetime (the first instance of the recurring event) and a ‘recurrence’ code, written in a way that the engineers at Google are able to work with. It would be relatively easy(ish) to add in daily/weekly/monthly/yearly recurring events to this program, but working with how Google stores custom recurring events is much more difficult.
It’s not impossible to do this, but it just will take a really long time to think and logic my way through everything, so if anyone wants to figure this out as a programming challenge, feel free to.
- Because of the nature of the Google authorization, you will have to renew the authorization every couple of weeks. This is similar to how you are automatically logged out of your Google account on applications and have to log in and give permissions again.
- This program is virtually allowing your computer to act as the mediator between the Notion servers and Google Calendar servers. As such, your code will only run if you manually run it or, if you set it up to run in the background, you’ll need your computer to be on. You could upload the files to an online service like AWS to run it in the cloud, but I only recommend this if you know what you’re doing.
- To avoid overloading the Notion servers if lots of people are using this code, only tasks/events occurring the day the code is run or within the next week will be synced.
- Existing tasks will be duplicated if there are more than 100 tasks in Notion's database that are being put into the code at any one time. The reason for this is due to the Notion API’s 100 database item limit. Unfortunately, this can’t really be coded around. This is another reason that the code only looks at tasks/events that are today or in the next week.
- Multi-Calendar Sync Breaks When GCal event deleted but not Notion item. If you delete an item on gCal and don’t check it off or delete it in Notion, the next time that the code runs, the gCal item will be remade. You can delete the gCal item by just checking it off as done in Notion and turning the delete option in the code on. Otherwise, delete the task in Notion and in GCal at the same time.