Synchronize Zotero with Notion via public APIs.
Here is the assumed workflow:
- Add a paper to Zotero
- Wait for synchronization
- Go to corresponding Notion page and annotate paper
At synchronization sync-zotero-notion
:
- Creates new items in Notion database
- Creates Zotero note with link to corresponding Notion page
- Updates Zotero fields in Notion database
👨🎓📗 Notion fields — Columns in Notion database that SHOULD BE edited manually.
🤖📕 Zotero fields — Columns in Notion database that MUST NOT be edited by users. Those columns are continuously overwritten with values from Zotero.
- Create Notion database with
Title
,Authors
,Link
,Published at
,Zotero 🖥️
,Zotero 🌐
,Zotero ItemID
fields. - Create integration token with read/write permissions
- Share database with integration (from top-right conner of database page):
- Create
config.yml
and fill with values obtained earlier
notion:
token: "<...>"
database_id: "<...>"
zotero:
token: "<...>"
group_id: 123456789
- Install
zotero-notion-sync
pip install git+https://github.com/sizmailov/zotero-notion-sync.git
- Synchronize
sync-zotero-notion --config=./config.yml
python3.9 -m venv venv
source venv/bin/activate
pip install -U pip wheel setuptools
pip install pip-tools
pip-sync requirements-dev.txt
pre-commit install
# Pre-commit hooks
pre-commit run --all-files
- Create two files
sync-zotero-notion.*
in/etc/systemd/system/
using template below. - Activate sync via
sudo systemctl start sync-zotero-notion.timer
sudo systemctl enable sync-zotero-notion.timer
sync-zotero-notion.service
# TODO: replace `<USERNAME>` with actual user name
[Unit]
Description=Sync Notion with Zotero
After=network.target network-online.target
[Service]
User=<USERNAME>
Group=<USERNAME>
Type=simple
ExecStart=/home/<USERNAME>/venv/bin/sync-zotero-notion --config=/home/<USERNAME>/config.yml
sync-zotero-notion.timer
[Unit]
Description=Sync Notion with Zotero
[Timer]
OnUnitInactiveSec=1m
OnBootSec=2m
[Install]
WantedBy=timers.target