A fully automated Notion Habit Tracker template with real-time performance graph and monthly analytics.
- Automated daily page addition, either via Notion template repeat feature or by running the Python script once a year
- Script will automatically delete any previous year pages, so they won't mess up with monthly analytics
- Monthly analytics provide Habits completion % insights via star ratings ⭐️
- Real-time daily performance charts 🚀
- Habit completion visual cues using progress bar and custom star ratings
- Notion formulae are used in a way, that user will only see current week and current monthly graph performance
- Duplicate this Notion Template to get started.
- Use services like ChartBase and Data Jumbo to have the monthly analytics chart for your habits database.
- With the new notion recurring template update, you can simply set an individual weekday template for a weekly repeat and it will automatically add a new page to the database.
Login Notion in a browser and viewing the database as a full page, the database ID is the part of the URL after your workspace name and the slash (acme/) and before the question mark (?). The ID is 32 characters long, containing numbers and letters. Copy the ID and paste it somewhere you can easily find later.
Repeat this process for both Habits DB and Analytics DB, and take a note of these Database IDs
https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...
|--------- Database ID --------|
- Clone the repo
git clone https://github.com/ashleymavericks/notion-habit-tracker.git
- Create a .env file in the project folder
- Add NOTION_HABIT_DB, NOTION_ANALYTICS_DB and NOTION_SECRET_KEY in .env file
NOTION_SECRET_KEY=PASTE_KEY_HERE
NOTION_HABIT_DB=PASTE_KEY_HERE
NOTION_ANALYTICS_DB=PASTE_KEY_HERE
- Install project dependencies
pipenv install
- Run the Script called
main.py
, it may take some time to complete
python3 main.py
- Due to Notion API rate throttling, the script might not able to remove a huge number of previous year records at once, in that scenario kindly run
remove_page.py
until all records get purged
python3 remove_page.py
Feel free to reach out, if you want to further improve the template.
This project is licensed under the MIT license