This is a useful migration tool for migrating articles from Kibela to Notion
- export all Kibela file (needs a owner privilege)
- FYI: Exporting Notes
- move all Kibela exported notes to this project root.
- e.g.
$ mv ~/Download/kibela-*-{n}/ ~/Documents/kibela-to-notion/
- e.g.
- set each props on Notion Database you want to import. sample is here. if you want to change prop name, also rename
src/Config.ts
Notion.Props.*.- Author:
Select Type
- Contributors:
Multi Select Type
- Folders:
Multi Select Type
- Groups:
Multi Select Type
- Comments:
Text
- PublishedAt:
Date
- UpdatedAt:
Date
- Author:
- create a integration from here Getting started. memo a secret value.
$ cp _env .env
and fill env value- You can select S3 or Google Drive as the image storage destination
$ yarn start
This tool was created when Notion API ver 2021-05-13
was released.
You can't upload images, you can't add comments to pages, and so on. (That's why I set the property "comments")
There are many limitations.
Kibela's export data exports images and markdowns separately And images in the text are specified as relative paths
e.g. 1-hoge.md
inline image
## about hoge
<img title='hoge-1.jpg' src='../attachments/10.jpg' width="500" data-meta='{"width":500,"height":471}'>
Currently (2021/12/02), Notion does not support images with relative paths in the text as import targets. The image in the statement must be an external URL. Therefore, this project proposes two solutions
-
Upload all the images to S3, and make the images public with a random URL, so that end users cannot access the images without knowing the unguessable URL itself. This will result in an inline preview of the image when you import the article into Notion
-
use Google Drive and store all images in a folder in Drive. The permissions are set so that only those who know the Drive URL and those who have been granted permissions on the folder side can view the images. The images imported into Notion cannot be previewed inline. You need to step through the link and view it on the Drive side. However, it is secure.