Importing from Notion¶
When to use¶
When a user imports a Notion export made with Export → Markdown & CSV (a .zip,
or its unzipped folder). Turn on Include subpages when exporting so pages and
database rows come through. You own it end to end. Read limestone-vault-conventions,
working-with-collections, and importing-from-obsidian first.
Run the import (one tool call)¶
Call limestone_import_notebook(path, collection_name) with the .zip (or folder).
Returns the usual summary + unconverted list.
How the import works (what the tool does)¶
Notion names every file Title <32-hex-id>; databases export a CSV (prefer the
…_all.csv, which has all rows/columns). The importer flattens the whole export into
one collection:
| Notion | Limestone |
|---|---|
each page .md |
a record (title = filename with the hex id stripped) |
| each database CSV row | merged onto its page by title, or a new record if it has no page |
| CSV columns | the collection's (union) text properties |
a Tags/Tag column |
real note tags |
 (percent-encoded) |
the file, stored beside the note, embedded as ![[filename]] |
[Label](Other%20Page%20id.md) page links |
[[Label]] wikilinks |
Finalizing (your job)¶
This importer is deliberately coarse — Notion is rich, so expect cleanup:
- Split merged databases. If the export had several databases, they're merged into one collection (a warning says so). Split them into separate collections by record type — that's the biggest win.
- Retype properties. Every CSV column imports as
text. Retype dates (Created,Due), selects (Status), numbers, and people to their real kinds. - De-duplicate the body preamble. Notion repeats a database row's properties as text at the top of its page body. Trim those if the columns already carry them.
- Callouts / toggles / equations. Callouts arrive as blockquotes or HTML, toggles as plain paragraphs, equations as raw LaTeX. Reformat the important ones.
- Linked file attachments (
[📎 name](file.pdf)) aren't pulled in (only image embeds are) — attach them withattaching-a-fileif the user needs them.
Evolving this skill¶
Notion changes its export often. When a structure recurs badly, work out the mapping,
apply it, and propose an update here or to importers/notion.py. Keep the two in sync.