Notion Client
The inspiration for this project came from my own experience using Notion. Though Notion's calendar view is very helpful, it would be even better if it was able to integrate with existing calendar solutions so that my Outlook or Google Calendar contained all the information I need for my day. As a student, my Notion calendar is full of class deadlines months and months in advance and incorpating all those events into my calendar without having to spend the afternoon manually inputting them.
Note: Some of the setup of this project is specific to how my Notion database is setup. This project can be cloned and changed accordingly to account for differences in how notion users have their setups.
Notion API
Notion's new API is very powerful and has allowed this project to happen. With their excellent development tools, I was able to quickly get this project working and collect the data I needed from my existing Notion databases.
Workflow
- Connect to Notion with API Key
- Get all events from board
- Organize into dictionary
- Organize into iCal format
- Export iCal file
Setup
API Token
Go to (Notion API Website)[https://www.notion.so/my-integrations] and register a new integration and receive your integration's API key.
Attach Database to Integration
- Go to your board in (Notion)[Notion.so]
- Click on "Share" in the top right corner
- Invite your integration to the board
Git Clone
To clone this repo, please run ...
git clone https://github.com/radroof22/Notion-iCal
Virtual Environment
In order to run the virtual environment, run ...
source env/bin/activate
Environment Variables
This project makes use of environment variables. In order to edit the configuration for your setup, please add a .env
file in the root directory. You must set the following environment variables...
NOTION_TOKEN=############ DATABASE_ID=##########
Run It!
Just run ...
python3 main.py
and see Notion.ics be generated
Add it!
Import the Notion.ics
into your favorite calendar app and enjoy!
To-DO
- Make Quiz and Exams All Caps