platform/dev/tool
Anna Khismatullina fc48297b70
Docs for importing from Notion (#6614)
Signed-off-by: Anna Khismatullina <anna.khismatullina@gmail.com>
2024-09-18 12:49:31 +07:00
..
config Enhanced Phased build (#4599) 2024-02-12 23:57:11 +07:00
src UBERF-8150: Update to fresh mongo (#6603) 2024-09-17 23:26:46 +07:00
.eslintrc.js Enhanced Phased build (#4599) 2024-02-12 23:57:11 +07:00
.npmignore initial tool contribution 2021-09-09 23:37:38 +02:00
build.sh Change shebangs to /usr/bin/env calls for better portability (#5961) 2024-07-01 23:21:52 +07:00
Dockerfile Enhanced Phased build (#4599) 2024-02-12 23:57:11 +07:00
jest.config.js :Apply templates (#3799) 2023-10-07 16:38:21 +06:00
package.json UBERF-8150: Update to fresh mongo (#6603) 2024-09-17 23:26:46 +07:00
README.md Docs for importing from Notion (#6614) 2024-09-18 12:49:31 +07:00
tsconfig.json Fix validate build (#4780) 2024-02-27 15:29:41 +07:00

How to Import Documents from Notion

To import Notion documents:

  1. Export documents from Notion as Markdown & CSV
  2. Extract the exported archive
    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}
    1. 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
  • workspace - workspace name where the documents should be imported to
  • 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

For clouds:

Here is an example for those who's using huly.app cloud:

To import Notion workspace with teamspaces

docker run \
  -e SERVER_SECRET="" \
  -e ACCOUNTS_URL="https://account.huly.app" \
  -e FRONT_URL="https://huly.app" \
  hardcoreeng/tool:latest \
  -- bundle.js import-notion-with-teamspaces /tmp/notion-docs \
--user jane.doe@gmail.com \
--password 4321qwe \
--workspace ws1

To import Notion workspace without teamspaces or a page with subpages.

docker run \
  -e SERVER_SECRET="" \
  -e ACCOUNTS_URL="https://account.huly.app" \
  -e FRONT_URL="https://huly.app" \
  hardcoreeng/tool:latest \
  -- bundle.js import-notion-to-teamspace /tmp/notion-docs \
--user jane.doe@gmail.com \
--password 4321qwe \
--workspace ws1 \
--teamspace notion
Here is an example for those who's using bold.ru cloud:

To import Notion workspace with teamspaces

docker run \
  -e SERVER_SECRET="" \
  -e ACCOUNTS_URL="https://account.bold.ru" \
  -e FRONT_URL="https://app.bold.ru" \
  hardcoreeng/tool:latest \
  -- bundle.js import-notion-with-teamspaces /tmp/notion-docs \
--user jane.doe@gmail.com \
--password 4321qwe \
--workspace ws1

To import Notion workspace without teamspaces or a page with subpages.

docker run \
  -e SERVER_SECRET="" \
  -e ACCOUNTS_URL="https://account.bold.ru" \
  -e FRONT_URL="https://app.bold.ru" \
  hardcoreeng/tool:latest \
  -- bundle.js import-notion-to-teamspace /tmp/notion-docs \
--user jane.doe@gmail.com \
--password 4321qwe \
--workspace ws1 \
--teamspace notion