A planning app which automatically schedules your tasks in Google Calendar using time blocking. Studies suggest that planning specific blocks of time to finish tasks improves productivity. Notioncal does this automatically by taking events from your Notion board and scheduling blocks during your work hours to finish them, working around your existing Google calendar events. The script will automatically optimize the order of your tasks, avoiding long blocks of the same task and alerting you when you won't be able to finish a task before the due date.
Requirements: npm, nodejs version 16+.
Notion board must have the following format:
- A number property named "Time" which corresponds to the estimated time commitment of the task, in hours
- A date property named "Due" which is the due date of the task
- The "Last edited time" property renamed to "Last Edited" (case-sensitive)
Notion board should have allt he properties shown in the example here - extra properties are OK too:
- Clone this repo. In the project directory, install dependencies with
npm install
- Follow the directions here to set up the Notion api. Save your key and database ID as environment variables named
NOTION_KEY
andNOTION_ID
, respectively. - Follow the instructions here to create a new Google Cloud project.
- Follow the instructions here to create and download Google Oauth credentials and download to project directory as
credentials.json
. - Run
get_token.cjs
and follow the prompts. - Save your Google credentials and token to the environment as
GC_CREDENIALS
andGC_TOKEN
, respectively. - Done! run
node index.js
to manually schedule current Notion tasks, or host it on a node server and set a trigger somehow.
After setup, just run node index.js
and the script will handle the rest automatically!
Built using NodeJS
APIs: Notion JS SDK, Google Calendar JavaScript API, Google OAuth Client
Libraries: dotenv, fs, JSON, Jest unit testing
Algorithms: Custom-designed greedy algorithm to optimize scheduling