Skip to content

phpusr/markdown-to-notion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-to-notion

This script import markdown notes to Notion

Requirements

  • nodejs
  • PostgresQL - for local cache of imported notes

How to run

  1. Create db and table imported_notes using script db.sql
sudo -u postgres createdb notion-test
sudo -u postgres psql -d notion-test -f db.sql
  1. Get NOTION_TOKEN and give access to your note where the data will be imported

  2. Run the script specifying the folder with markdown notes

export NOTION_TOKEN 'secret_notion_token'
export DB_HOST 'localhost'
export DB_NAME 'notion'
export DB_USER 'notion'
export DB_PASSWORD 'notion-password'

node index.js --import /path/to/notes
  1. Some notes may not import correctly. Solutions
node index.js --show-errors
  1. After correcting the original notes that were imported with an error, they can be imported again
node index.js --import-with-errors /path/no/notes

About

This script import markdown notes to Notion.

Resources

Stars

Watchers

Forks