الصفحات · Mark It Down
Google Keep importer
Status: shipped in #248 on top of the importer plugin contract from #246.
The google-keep importer ingests a Google Takeout export of Google Keep — the JSON-per-note export bundled with attachments.
It picks up automatically once shipped — the loader scans
apps/electron/importers/<id>/ at startup and the entry shows up in the
importer chooser modal and the File → Import from… menu.
Getting your data
- Open https://takeout.google.com/.
- Deselect everything, then re-select Keep.
- Export and download the resulting
.ziparchive. - Unzip the archive. This importer reads from a folder, not a zip — the Electron app intentionally avoids a zip dependency.
The unzipped layout looks like:
What you can pick
The importer accepts any of these as the source folder:
- The Takeout root that contains a
Takeout/Keep/subdirectory. - The
Takeout/directory directly (so it seesKeep/as a child). - The
Keep/directory itself (already-extracted notes).
detect() probes for whichever shape is present — you don't need to think
about which level to pick.
What it does
For every .json file under the resolved Keep folder:
-
Parses the file as a Keep note (skipping non-note JSON like
Labels.txtmetadata). -
Skips notes with
isTrashed: trueunlessMID_IMPORTER_INCLUDE_TRASHED=1is set in the environment when launching the app. -
Maps Keep fields to markdown / frontmatter:
Keep field Imported as titlenote title (filename); falls back to first 32 chars of body, then to Untitled <createdAt>textContentmarkdown body listContent[]- [ ]/- [x]task list (replacesthe body when present) labels[].namefrontmatter tags:isPinnedfrontmatter pinned:color(e.g.RED)frontmatter color:(lower-cased;hex preserved verbatim; DEFAULT→ null)isArchivedfrontmatter archived: trueif setisTrashedfrontmatter trashed: trueif includedcreatedTimestampUsecfrontmatter created:(ISO 8601)userEditedTimestampUsecfrontmatter updated:(ISO 8601)attachments[]yielded as ImportedAttachments; thehost writes them under Imported/google-keep/attachments/<slug>/always frontmatter source: google-keep -
References attachments inline at the bottom of the body. Image-mimetype attachments use
; everything else uses[name](href). Thehrefmatches where the host actually writes the file, so the markdown renders correctly once persisted.
Frontmatter shape
archived and trashed only appear when the source note had them set.
Trashed notes
By default the importer skips trashed notes — Keep keeps deleted notes
around for 7 days, and most users do not want to re-ingest them. If you do,
launch the app with MID_IMPORTER_INCLUDE_TRASHED=1 in the environment:
Edge cases
- Notes with no title and no
textContentuse the first list item or fall back toUntitled <createdAt>. - Duplicate slugs across notes (two notes with the same title after
slugifying) are disambiguated with
-2,-3, ... suffixes for the attachment folder reference. - Attachments declared in
attachments[]but missing from disk are logged and skipped — the note still imports. - Zip input (
.zippath) is rejected with a clear message asking the user to unzip first; this keeps the desktop app dependency-free.
Source
apps/electron/importers/google-keep/index.ts— the importer module.
Acceptance checklist (#248)
- User picks an unzipped Takeout folder (root,
Takeout/, orKeep/). - Each
.jsonbecomes a.mdwith frontmatter + body. - Checklists rendered as task lists.
- Attachments yielded as
ImportedAttachments (host persists underImported/google-keep/attachments/<note>/) and referenced inline. - Trashed notes skipped by default;
MID_IMPORTER_INCLUDE_TRASHED=1opts in. - Docs at
docs/importer-google-keep.md(this file).