Sections
Documentation › Use
Notes: import, export and OneNote
Entry point: Notes > sidebar > "Import and export" (on a phone, the icon next to "New note").
File sources
| Source | Accepted files | What is imported |
|---|---|---|
| Markdown | .md, .markdown, .txt, or .zip |
Title (front matter title, otherwise the file name), tags, folders, dates |
| Obsidian | Vault folder (folder picker) or .zip |
Same; hidden folders (.obsidian, .trash) ignored |
| Notion | "Markdown & CSV" export as .zip (nested zips accepted) |
Notion identifiers removed from names, internal links converted to [[Titre]], duplicated H1 title removed |
| Evernote | .enex (or a .zip of .enex files) |
Title, tags, dates, checkboxes, images and attachments (<resource> linked by their MD5 hash, data: images) |
Limits: 2,000 files and 100 MB per file for one import.
Images and attachments
| Source | Recognized references |
|---|---|
| Markdown, Notion | , [nom](fichier.pdf): path relative to the note, otherwise the file name alone |
| Obsidian | ![[image.png]], ![[image.png|300]], [[document.pdf|libellé]], resolved by name as Obsidian does |
| Evernote | <en-media hash> and the note's resources |
| OneNote | <img> (full-resolution version) and <object data-attachment> downloaded through Graph, 30 per page |
- Storage:
data/note-files/<sha256 tronqué>, content-addressed (same file, same id: a reimport stays "unchanged"). 20 MB per file. - Link in the note:
/api/notes/files/<id>/<nom>. Reading is allowed if a note readable by the profile references the file. Served withContent-Security-Policy: sandboxandnosniff. - Daily cleanup: a file referenced by no note (trash included) for more than an hour is deleted.
- File not found in the import, or unreadable OneNote resource: the original reference (or a text marker) is kept.
- Preview: images loaded with the session (token and profile), can be enlarged; attachments shown as a button (PDFs open, other files are downloaded).
- Search in PDFs: text extracted on upload or import (pdfjs in a worker: at most 20 s, 256 MB, 300 pages, 200,000 characters), cached in
note-files/<id>.txtand deleted with the file. PDFs already present are indexed at startup, one at a time. Search terms apply to the body and the PDFs of the note,-motexclusions included; if the term is only in a PDF, the excerpt comes from the PDF and the list shows "Found in name.pdf" (matchFile). Scanned PDFs (without a text layer): not indexed, no OCR. - In the editor: paste a screenshot, drag and drop, image and paperclip buttons (photo picker on a phone).
POST /api/notes/files(multipartfile+noteId, write permission required, 20 MB). The file is readable by its author for one hour, long enough for the note that references it to be saved.
Reimport and duplicates
- Each imported note keeps its source (
format+ path or identifier). Reimporting the same source updates the note instead of creating another one. - Identical content: the note is counted as "unchanged".
- Note modified in Noyau since the last import: conflict, the Noyau version is kept and listed in the report.
- Note moved to the trash in Noyau: ignored.
Recurring import (Obsidian, Notion, Evernote, which have no usable write API): regularly reimport the same folder or the same export. Only the notes that changed are touched.
Export
A .zip of Markdown: one folder per notebook, then the note folders; one file per note with front matter (title, tags, created, updated, noyau). Images and attachments go in <Carnet>/_fichiers/, referenced by relative path. It can be opened directly as an Obsidian vault and reimported into Noyau (files included). Scope: all readable notes, or one notebook.
OneNote (Microsoft Graph)
Setting up the Microsoft application (once)
- Azure portal > Microsoft Entra ID > App registrations > New registration.
- Supported account types: as needed (personal Microsoft accounts and/or work accounts).
- Platform: Mobile and desktop applications, redirect URI = the one shown in Noyau's OneNote tab (
https://<hôte Noyau>/api/oauth/onenote/callback). - Authentication > "Allow public client flows": Yes (PKCE, no client secret needed).
- API permissions > Microsoft Graph > delegated:
Notes.ReadWrite,offline_access,User.Read. - Paste the "Application (client) ID" into Noyau. Tenant:
common(default),consumers,organizations, a GUID or a domain.
Tokens
- OAuth "authorization code" flow with PKCE (S256), single-use state valid for 10 minutes.
- Only the refresh token is stored, encrypted (AES-256-GCM) in
onenote-sync.jsonwith a key derived (HKDF) from the server's master secret. It is never sent back to the interface or written in clear text. - The project vault is not used: it is locked by a password, which would prevent background sync.
- Revoked or expired token (
invalid_grant): the connection is erased and the interface asks you to reconnect.
Sync direction
A link connects a OneNote section to a Noyau notebook.
| Direction | Behavior |
|---|---|
| OneNote → Noyau (always) | Pages that are new or modified since the last run (lastModifiedDateTime date) are imported as Markdown. An unchanged page is not read again. |
| Noyau → OneNote ("Send to OneNote" option) | Notes created in Noyau are published as pages; after that, only the page's noyau-body block and its title are replaced (PATCH), and the rest of the OneNote page is preserved. |
| Conflicts | Note changed on both sides: not overwritten, flagged in the report. A page created in OneNote is never rewritten from Noyau. |
Automatic sync every hour (checked every 5 minutes), can be turned off per link; "Sync now" button. At most 150 pages read per run, 500 pages listed per section.
Known limitations
- OneNote ink: ignored.
- Sending to OneNote: the note's images and attachments are attached to the page (multipart request,
<img>and<object>). Graph limits: 5 files and about 3.5 MB per upload; beyond that, the file stays a text marker ([image : nom]or its label). - Deleting a page on one side: not propagated.
- Unlinking a section does not delete any note in Noyau.