notetaking-migration
Migrate notes/markdown into Notion with full fidelity.
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- notetaking-migration
- tags
- [ "notion", "obsidian", "migration", "export", "notes", "automation" ]
- author
- hermes-curator
- license
- MIT
- version
- 1.0.0
- triggers
- [ "obsidian to notion", "export vault to notion", "migrate notes to notion", "notion bulk import", "export markdown to notion" ]
- description
- Migrate notes/markdown into Notion with full fidelity.
03 SKILL.md 正文
Notetaking Migration (Obsidian → Notion verified)
Bulk-moving notes between systems. Verified live against the Notion API with an internal integration token + the official Obsidian CLI on Linux. The lesson: the naive path (create page, then PATCH markdown) FAILS, and "200 OK" lies — content can be dropped silently.
Preconditions
- Notion internal integration token (
NOTION_TOKEN, startsntn_). SHARE a PARENT page with the integration (Settings → Connections → your integration). Without this, API returns 404. - Obsidian CLI (
obsidian) needs a RUNNING Obsidian instance (IPC)./usr/bin/obsis OBS Studio — NOT Obsidian. - Internal integrations CANNOT create workspace-root pages — you must target an existing
page_id.
CRITICAL API quirks (each verified the hard way)
- PATCH /v1/pages/{id}/markdown FAILS —
validation_error: body.type should be defined. Do NOT create-then-patch. Instead POST /v1/pages withmarkdownin the body — Notion converts markdown → blocks server-side (headings, code, tables, images all render). Verified: a ~3 KB note became 31 blocks (h2, code, table, image, quote). - Parent required:
parent: {"page_id": "<existing id>"}. No workspace-root creation. [[wikilinks]]are unknown to Notion — they land as literal[[Name]]text. For fidelity, do 2-pass: (a) create all pages, build a title→page_id map; (b) rewrite[[Name]]→ a Notion mention<mention-page url="...">Name</mention-page>before creating. Counts grow fast (1,600+ across 4 vaults).![[local embed]]points at a vault file. If it is already an http(s) URL (e.g.raw.githubusercontent.com/...), Notion stores it as an external image automatically. If local, upload via the file_uploads 3-step flow and referencefile_upload_id.- Rate limit ~3 req/s. 460 pages ≈ 3–4 min single pass, ~8 min with link resolution.
Pipeline (full fidelity, 2-pass)
- Enumerate
*.mdper vault (exclude/.obsidian/,/.trash/). - POST each as a child of the parent; body
markdown= file contents. Collect{title: page_id}. - Wikilink fidelity: pre-scan all notes for
[[...]]; on create, substitute resolved page ids. - Local embeds: upload each unique asset; substitute
![[asset]]with the uploaded reference.
VERIFY — do not trust HTTP 200
GET /v1/blocks/{page_id}/children — confirm block count > 0 and types match
(heading/code/table/image). A 200 with 0 blocks means content was silently dropped.
No Notion equivalent
.obsidian/ config, .canvas, .base, .excalidraw stencil drawings (the plugin keeps its
library in one merged file), rich frontmatter → markdown only.
Token sourcing for bulk one-shot writes
Read from ~/.mcp_servers.json → mcpServers.notion.env.NOTION_TOKEN. Call the API directly
with curl to avoid MCP server-startup latency per call. For reads, the MCP server is fine.
Related
mcp-server-install-verify→ references/obsidian-excalidraw-mcp.md (Obsidian CLI binary confusion,ext=gotcha, on-disk-vs-active plugin state, stencil merge recipe).notionskill (bundled) for the full API surface; note it documentsPATCH /markdownas working — it is NOT for an internal integration. Use POST-with-markdown instead.
04 同仓库更多 Skills
blocked-page-recovery
Use when a fetch fails: 403/429, paywall, WAF, bot wall.
gemini-vision-fallback
Vision fallback: Gemini REST API if vision_analyze blocked.
twitter-cli
Use twitter-cli for ALL Twitter/X operations — reading tweets, posting, replying, quoting, liking, retweeting, following, searching, user lookups. Invoke whenever user requests any Twitter interaction.
prism-scan
Structural analysis through dynamically generated cognitive lenses. Generates the optimal analytical lens for the specific code/artifact, then executes it. Finds conservation laws, structural invariants, and concrete bugs that vanilla analysis misses. Use on any code file, system design, or text artifact.
prism-reflect
Constraint transparency: analyzes an artifact structurally, then analyzes what its own analysis concealed. Produces a conservation law AND a constraint report showing what was maximized, what was sacrificed, and what to investigate next. The only AI skill that knows what it can't see.
prism-full
Full Prism: multi-pass structural analysis with mandatory adversarial self-correction. Designs custom analytical passes, executes them with chaining, then attacks its own findings before synthesizing. Use for maximum depth on important code or artifacts.