What you get
Your Notion pages become markdown files in a folder of your repository, and your databases become typed documents you can query. Nothing stays behind in a proprietary format: after the import there is no notdocs-specific export to worry about, because the files are the export.
Export from Notion
In Notion, open the workspace or page you want to move and choose Export, format Markdown & CSV, with subpages included. You get a zip.
Import
From the workspace, open a project's import page and drop the zip. From the CLI:
notdocs import notion ./Export-….zip --into docs/notion --dry-run
notdocs import notion ./Export-….zip --into docs/notion--dry-run prints every file that would be created and stops. The default destination is docs/notion.
Before and after
Export-3f2a…/
Launches 9c1e…/
Pricing launch 7b40….md
Tasks 51aa….csv
Tasks 51aa…/
Annual toggle 0d2f….md
Tier names 88c1….mddocs/notion/
launches/
pricing-launch.md type: page
tasks/
annual-toggle.md type: task, status: doing
tier-names.md type: task, status: doneThe ids leave the file names and the links; the database properties land in frontmatter; the folder shape stays yours.
What the importer does
- Strips the
Export-<uuid>/wrapper folder and the 32-character page ids Notion appends to every file name and link, so paths read the way they did in Notion. - Turns each database row into a typed document: a row whose database has a Status property becomes a
task, everything else apage. Properties become frontmatter, fitted to the type's fields (Urgent, High, Medium and Low becomep0top3; several assignees are joined; numbers and dates are written as text), and a value that still does not fit is kept asnotion<Name>rather than refused. - Gives two pages whose names match once the ids are gone their own files,
Name.mdandName-2.md, and points their links at the right one. - Rewrites links between pages to relative markdown links that resolve after the rename.
- Stamps every document with an
idon first sight, so later renames do not break links.
After the import
Open any imported database folder and add a query block to see it as a board:
```notdocs
type: task
view: board
groupBy: status
```Everything from here on is a commit: the import lands as ordinary files, your agents can read them the same day, and you can leave whenever you want by doing nothing at all.