Bidirectional synchronize calendar events within notion and google calendar
Project description
Notion-GCal-Sync
Notion-GCal-Sync is a python application to bidirectional synchronize calendar events within notion and google calendar.
Getting started
-
Install package from PyPi
pip install notion-gcal-sync
-
Get your Google Calendar
credentials.jsonlike this -
Get your Notion Token like this
-
Set up the Notion page like this
-
Create config folder
~/.notion-gcal-syncand copy thecredentials.jsoninsideLinux (or WSL)
cp ~/Downloads/client_secret_*.apps.googleusercontent.com.json "~/.notion-gcal-sync/client_secret.json"
Windows Copy your
client_secret_*.apps.googleusercontent.com.jsonasclient_secret.jsoninsideC:\Users\dude\.notion-gcal-sync# TODO -
Run the script and fill out the prompts. If not sure skip the optional bits.
- Make sure you get your timezone right
- Use your TZ database name as
timezone_name - Use the UTC DST offset as
timezone_diff
- Use your TZ database name as
google_mail: Your mail you are using in google calendar want to have syncednotion_database_urlThe url for the page you set up in 4.notion_token: The token you set up in 3.
notion-gcal-sync 2021-10-28 19:55:41,198 [INFO] /home/worker/.notion-gcal-sync/config.yml does not exist Create non-existing /home/worker/.notion-gcal-sync/config.yml? [Y/n]: y 2021-10-28 19:55:42,630 [INFO] Configuring /home/worker/.notion-gcal-sync/config.yml default_event_length [60]: no_date_action [skip]: timezone_name [Europe/Berlin]: timezone_diff [+02:00]: google_mail (e.g name@gmail.com): cooldude@gmail.com notion_database_url [https://www.notion.so/***?v=***&p=]: notion_token: secret_ASDFASDFCASDF
- Make sure you get your timezone right
-
It will prompt you to authenticate yourself for google. This will create a
token.json.$ notion-gcal-sync ... Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=***
For more information follow these instructions.
Usage
Make sure you followed the setup and
configured the config.yml with your notion token and page for Notion API and gathered and setup
credentials client_secret.json for Google Calendar API.
notion-gcal-sync
Docker
To run inside the container you need to add the volume at ~/.notion-gcal-sync
docker run -v ~/.notion-gcal-sync:/home/worker/.notion-gcal-sync notion-gcal-sync
If you want to update the setup within the cli or only map the credentials, you'll need to add interactive mode -it and for authenticating a new token you'll also need --net=host
docker run --net=host -it \
-v ~/.notion-gcal-sync/client_secret.json:/home/worker/notion-gcal-sync/client_secret.json \
notion-gcal-sync
If you do not want to mount, build it yourself with your credentials.
FROM ghrc.io/ravio1i/notion-gcal-sync
COPY token.json /home/worker/token.json
COPY config.yml /home/worker/config.json
Notes
BE AWARE OF THE FOLLOWING:
- This sync will update your source links in gcal. Links to mail etc. will get overwritten with a link to the notion page. The original links will be put on top of the description
- This sync will update all your invites from other calendars not specified to your default calendar. There is a button on gcal to restore back
- Goals defined from calendar apps are skipped.
- Recurrent original events are skipped. Recurrent occurrences of events are created one by one in notion. Changing in notion will change only an occurrence in GCal.
With around ~2500 events in gcal the sync:
- to get all events took ~1min
Known Limitations
- The Last update of an event of notion and google calendar are checked on minute base. When changing an event more then once within a minute and syncing right away
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notion-gcal-sync-1.1.12.tar.gz.
File metadata
- Download URL: notion-gcal-sync-1.1.12.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2840d648f4fa165c8157ef91496c1f263878e7f451627ac45df242ffd7fdea7
|
|
| MD5 |
9672558598f7cbcaf2b1bf74da0b006c
|
|
| BLAKE2b-256 |
5d0b718fbb5f3dea5408868c57563ab902aa7029052b1febd197ea9274323a13
|
File details
Details for the file notion_gcal_sync-1.1.12-py3-none-any.whl.
File metadata
- Download URL: notion_gcal_sync-1.1.12-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dcf3620df270edd02a7daf5c6109bf8126473e90eba13014ca950507894a00c
|
|
| MD5 |
e8de2a77e4fc61c9c5b25f220bd70f9e
|
|
| BLAKE2b-256 |
5d16451faa903ede4fc62e53e1994e6b029be78ee9ecf8e6b2c2a30a31f602ef
|