Skip to content

Convert Notion database to markdown files automatically & periodically

Notifications You must be signed in to change notification settings

thinkerchan/notion2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notion2md

notion2md is a github action workflow to conver Notion Database to Markdown file automatically. feel free to use it on your blog or anywhere you want.

Screenshots

demo notion database

demo markdown file

Requirements

1. create a notion database

you can simply duplicate this demo db as a template

2. get notion token and database id

3. fork this repo & create github tokens

  • click to fork this repo
  • github token: Settings -> Secrets and variables -> Actions -> New repository secret
  • fill your NOTION_DATABASE_ID and NOTION_TOKEN according to the values that you get from your notion

Local try

create .env file like below once you have cloned the repo on your local machine

# .env file on the root directory
NOTION_TOKEN=your_token
NOTION_DATABASE_ID=your_db_id
// set CONFIG as below in `.github/workflows/notion2md.js` if you want
const CONFIG ={  //default values
  days: 7,
  dir:'./posts',
  filename:'weekly news'
}
 # then run the dev command
 npm i
 npm run dev

How to collect

  • install save-to-notion to your browser
  • then select the notion database you created
  • fill the form and click save

demo

Cases

About

Convert Notion database to markdown files automatically & periodically

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published