2024-09-18 08:49:31 +03:00
|
|
|
## How to Import Documents from Notion
|
|
|
|
|
|
|
|
To import Notion documents:
|
|
|
|
|
|
|
|
1. Export documents from Notion as *Markdown & CSV*
|
|
|
|
2. Extract the exported archive
|
|
|
|
3. 1. If you want your docs to be imported along with Notion teamspaces, use this command:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
rushx run-local import-notion-with-teamspaces ${dir} \
|
|
|
|
--user ${user} \
|
|
|
|
--password ${password} \
|
|
|
|
--workspace ${workspace}
|
|
|
|
```
|
|
|
|
|
|
|
|
3. 2. If you want the docs to be imported to a new teamspace, use this command:
|
|
|
|
|
|
|
|
```
|
|
|
|
rushx run-local import-notion-to-teamspace {dir} \
|
|
|
|
--user ${user} \
|
|
|
|
--password ${password} \
|
|
|
|
--workspace ${workspace} \
|
|
|
|
--teamspace ${teamspace}
|
|
|
|
```
|
|
|
|
|
|
|
|
* *dir* - path to the root of the extracted archive
|
|
|
|
* *user* - your username or email
|
|
|
|
* *password* - password
|
2024-09-26 16:53:19 +03:00
|
|
|
* *workspace* - workspace url where the documents should be imported to
|
2024-09-18 08:49:31 +03:00
|
|
|
* *teamspace* - teamspace to be created for newly imported docs
|
|
|
|
|
|
|
|
|
|
|
|
### Examples
|
|
|
|
|
|
|
|
#### For local run:
|
|
|
|
When importing Notion workspace with teamspaces
|
|
|
|
```
|
|
|
|
rushx run-local import-notion-with-teamspaces /home/john/extracted-notion-docs \
|
|
|
|
--user john.doe@gmail.com \
|
|
|
|
--password qwe1234 \
|
|
|
|
--workspace ws1
|
|
|
|
```
|
|
|
|
When importing Notion workspace without teamspaces or a page with subpages
|
|
|
|
```
|
|
|
|
rushx run-local import-notion-to-teamspace /home/john/extracted-notion-docs \
|
|
|
|
--user john.doe@gmail.com \
|
|
|
|
--password qwe1234 \
|
|
|
|
--workspace ws1 \
|
|
|
|
--teamspace imported
|
|
|
|
```
|
|
|
|
|
2024-09-25 16:44:21 +03:00
|
|
|
#### For cloud deployment:
|
2024-09-18 08:49:31 +03:00
|
|
|
##### Here is an example for those who's using huly.app cloud:
|
2024-09-25 16:44:21 +03:00
|
|
|
1. Go to the root folder of the extracted archive with exported data.
|
|
|
|
2. Run import command as follow:
|
|
|
|
|
|
|
|
* To import Notion workspace with teamspaces
|
2024-09-18 08:49:31 +03:00
|
|
|
```
|
|
|
|
docker run \
|
|
|
|
-e FRONT_URL="https://huly.app" \
|
2024-09-25 16:44:21 +03:00
|
|
|
-v $(pwd):/data \
|
2024-09-26 16:53:19 +03:00
|
|
|
hardcoreeng/import-tool:latest \
|
2024-09-25 16:44:21 +03:00
|
|
|
-- bundle.js import-notion-with-teamspaces /data \
|
2024-09-18 08:49:31 +03:00
|
|
|
--user jane.doe@gmail.com \
|
|
|
|
--password 4321qwe \
|
|
|
|
--workspace ws1
|
|
|
|
```
|
2024-09-25 16:44:21 +03:00
|
|
|
* To import Notion workspace without teamspaces or a page with subpages.
|
2024-09-18 08:49:31 +03:00
|
|
|
```
|
|
|
|
docker run \
|
|
|
|
-e FRONT_URL="https://huly.app" \
|
2024-09-25 16:44:21 +03:00
|
|
|
-v $(pwd):/data \
|
2024-09-26 16:53:19 +03:00
|
|
|
hardcoreeng/import-tool:latest \
|
2024-09-25 16:44:21 +03:00
|
|
|
-- bundle.js import-notion-to-teamspace /data \
|
2024-09-18 08:49:31 +03:00
|
|
|
--user jane.doe@gmail.com \
|
|
|
|
--password 4321qwe \
|
|
|
|
--workspace ws1 \
|
|
|
|
--teamspace notion
|
2024-09-26 16:53:19 +03:00
|
|
|
```
|