This is a simple script to sync a Notion calendar to an ics file and upload it to a webserver. This is useful if you want to sync your Notion calendar to your phone or other calendar app.
git clone git@github.com:baptistejouin/cron-notion-ics.git && cd cron-notion-ics
# Create a virtualenv (optional)
# install virtualenv: pip install virtualenv
virtualenv env
source env/bin/activate
# Install dependencies
pip install -r requirements.txt
- Create a new Notion integration at https://www.notion.so/my-integrations
- Copy the calendar ID from the URL of your calendar
cp config.example.json config.json
python3 notion-ics.py
crontab -e
*/5 * * * * /usr/bin/python3 /path/to/notion-ics/notion-ics.py
You can use nginx, caddy, apache, etc.
- Content of the description (based on the content of the page) is not fully supported, some issues can occur.
- For performance reasons, and api limitations, the script fetch only the last week of events backwards, this can be changed in the
config.json
file. - Location is not supported yet.
- Some iCalendar properties are defined by default, so not dynamic (eg.
SEQUENCE
,TRANSP
,STATUS
).
MIT