Skip to content

ashleymavericks/notion-habit-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notion Habit Tracker

License: MIT

A fully automated Notion Habit Tracker template with real-time performance graph and monthly analytics.

notion_habit_tracket


Features

  • 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

Setup Pre-requisites

No Code Approach

  • 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.

Find Database ID

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 --------|

Script Usage

  1. Clone the repo
git clone https://github.com/ashleymavericks/notion-habit-tracker.git
  1. Create a .env file in the project folder
  2. 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
  1. Install project dependencies
pipenv install
  1. Run the Script called main.py, it may take some time to complete
python3 main.py
  1. 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

Contributing

Feel free to reach out, if you want to further improve the template.

License

This project is licensed under the MIT license

About

A notion habit tracker automated template with real-time performance graph and monthly analytics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages