Sync your Strava reviews to a Notion database!
Inspired by @IVIURRAY and @kevinschaich.
- Create an app though the Strava API; you can use this image for the icon
- Insert
Client ID
andClient Secret
into your.env
- Create an app through the Notion API; you can use this image for the icon
- Add your secret as
TOKEN_V3
in your.env
- Create a database (create this as a blank database page) in Notion and copy the ID to config file; see "Finding your Notion database ID"
- Give your Notion integration access to the database (under the
Share
button) - Add the relevant columns to the database; the default needs: Name, Type (select), Length (number), Time (number), Date (date), Power (number), Elevation (number), Strava Link (URL)
- You can customize these in the
notion_api_new.py
file.
- You can customize these in the
Copy the link to your database page that will look like: https://www.notion.so/<long_hash_1>?v=<long_hash_2>
then choose <long_hash_1>
, this is the database ID.
gh repo clone michaelfromyeg/strava2notion
cd strava2notion
python3.12 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
make run
- This will open a browser to ask you to authenticate the integration; if you're on WSL, I recommend using
google-chrome
via WSLg. - For subsequent runs set
ALL_DATA
inconfig.py
toFalse
to upload only new activities. - You can also run it via Windows Task Scheduler (use the
.bat
file) or on a related service (e.g., as acronjob
)
- This will open a browser to ask you to authenticate the integration; if you're on WSL, I recommend using
The notion_api_test.py
file is left in for you to test adding different data to the database. See Strava API for what other data is taken from the API request.
The HTTP Requests are abstracted away by two helpful libraries: stravio and notion-sdk-py.
Their documentation coupled with the official API documentation is useful for debugging and customization.