Skip to content

lancemathias/notioncal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notioncal

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.

Getting started

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:

notion_example

  1. Clone this repo. In the project directory, install dependencies with npm install
  2. Follow the directions here to set up the Notion api. Save your key and database ID as environment variables named NOTION_KEY and NOTION_ID, respectively.
  3. Follow the instructions here to create a new Google Cloud project.
  4. Follow the instructions here to create and download Google Oauth credentials and download to project directory as credentials.json.
  5. Run get_token.cjs and follow the prompts.
  6. Save your Google credentials and token to the environment as GC_CREDENIALS and GC_TOKEN, respectively.
  7. Done! run node index.js to manually schedule current Notion tasks, or host it on a node server and set a trigger somehow.

Usage

After setup, just run node index.js and the script will handle the rest automatically!

Nerd Stats

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

About

Automatic Schedule Planner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published