Codex to Obsidian Migration: Is It Now Simple?
In this article
- Background: Why the Move Was Painful
- How Codex Fits Into the Workflow
- Choosing the Right Conversion Approach
- Step-by-Step: A Practical Migration with Codex
- Common Problems and How to Solve Them
- Comparing Codex to Other Migration Tools
- Costs and Safety Considerations
- Alternatives: When Not to Use Codex
- Frequently Asked Questions
Yes, Codex has made moving from Notion to Obsidian a straightforward task, though the exact process depends on the tools you use and the complexity of your Notion workspace. The core workflow now involves exporting your Notion data, converting it to Markdown, and importing it into Obsidian—a process that can be completed in under an hour for most users.
Background: Why the Move Was Painful
Notion and Obsidian serve different philosophies. Notion is an all-in-one workspace with databases, nested pages, and rich blocks. Obsidian is a plain-text Markdown editor that stores files locally. For years, migrating meant losing database views, relational links, and embedded content. Notion's export produces HTML or Markdown, but the Markdown is messy—full of callouts, toggle lists, and database tables that don't translate cleanly. Early converters existed but required manual cleanup, scripting knowledge, or paid tools. The friction kept many users locked in, even when they wanted Obsidian's offline access, speed, and plugin ecosystem.
How Codex Fits Into the Workflow
Codex, OpenAI's coding agent, can automate the conversion and cleanup steps. The typical workflow is:
- Export from Notion: In Notion, go to Settings → Export → choose Markdown & CSV, select “Include subpages” and “Create folders for subpages.” This generates a ZIP file.
- Unzip and inspect: You'll get a folder with .md files and attachments. Codex can analyze the structure and identify problem areas.
- Run a conversion script: Codex can write and execute a Python or Node.js script that converts Notion's Markdown quirks (like callouts, toggle lists, and database tables) into standard Markdown or Obsidian-compatible formats.
- Import into Obsidian: Copy the cleaned files into your Obsidian vault. Obsidian automatically indexes them, and any internal links that were preserved will work.
Codex's advantage is its ability to handle edge cases—like nested bullet lists, images with captions, and database properties—by reading the files and adjusting the script iteratively. It can also merge duplicate notes, fix broken links, and even generate YAML frontmatter for tags and dates.
Choosing the Right Conversion Approach
Not all migrations are equal. Consider these factors:
- Database complexity: If your Notion databases are simple (just title and text), a basic script works. If they have relations, rollups, or formulas, you'll need to decide whether to flatten them into Markdown tables or preserve them as Obsidian properties.
- Number of files: For under 100 notes, a manual copy-paste might be faster than setting up a script. For thousands, automation is essential.
- Attachment handling: Images and PDFs need to be moved into Obsidian's attachment folder. Codex can rename them and update links.
- Desired Obsidian features: Do you want tags, aliases, or dataview queries? The script can add these during conversion.
A common misconception is that Codex does everything automatically. In reality, you still need to review the output—especially for databases with complex properties. Codex can reduce hours of manual work to minutes, but it's not a one-click solution.
Step-by-Step: A Practical Migration with Codex
Here's a concrete example using a hypothetical Notion workspace with 200 notes and 5 databases:
- Export and unzip: You get a folder with 200 .md files and 50 images.
- Prompt Codex: “Write a Python script that converts these Notion-exported Markdown files to Obsidian format. Handle callouts by converting them to blockquotes, convert toggle lists to regular bullet lists, and convert database tables to YAML frontmatter properties. Also, move all images to an attachments folder and update links.”
- Run the script: Codex writes the script, runs it, and reports any errors. It might find that some database properties have multiple values—it will ask you how to handle them.
- Review output: Spot-check a few files to ensure formatting is correct. Codex can also generate a report of any files that failed conversion.
- Open in Obsidian: Create a new vault pointing to the folder. Obsidian will index everything. Check that internal links resolve.
This process typically takes 30–60 minutes, including debugging. Without Codex, it could take a full day.
Common Problems and How to Solve Them
Even with Codex, you'll hit issues:
- Broken internal links: Notion uses page IDs in URLs. Codex can map them to filenames and rewrite links.
- Nested databases: A database inside a page becomes a subfolder. Codex can flatten it or create a separate note with a link.
- Code blocks with language tags: Notion exports them with a specific syntax; Codex can convert to triple-backtick fences.
- Callouts and toggle lists: These become blockquotes or collapsible sections. Codex can convert them to Obsidian's callout syntax (e.g., >[!note]).
- Large files: Some Notion pages are huge. Codex can split them into smaller notes based on headings.
If Codex gets stuck, you can provide more context or ask it to debug the script. The iterative nature is what makes it powerful.
Comparing Codex to Other Migration Tools
Before Codex, popular options included:
- Notion2Obsidian (community script): A one-time script that handles basic conversion but requires manual setup and doesn't adapt to edge cases.
- Pandoc: A universal document converter that can handle Markdown but struggles with Notion's custom blocks.
- Paid services: Some offer fully managed migration but cost money and may not handle custom setups.
Codex differs because it's interactive. You can ask it to fix specific issues, add features, or explain what it did. It's like having a developer on call. However, it requires a ChatGPT Plus or API subscription, whereas community scripts are free.
Costs and Safety Considerations
Using Codex costs money—either through a ChatGPT Plus subscription (which includes Codex access) or API usage. For a one-time migration, the cost is minimal (a few cents to a few dollars). Safety-wise, you're granting Codex access to your files. Ensure you:
- Back up your Notion export before running any script.
- Run scripts in a sandboxed environment if you're concerned about data privacy.
- Review the script before executing it, especially if it handles sensitive data.
Codex doesn't send your files to external servers unless you use the cloud version; the local CLI runs on your machine. Still, treat your data with caution.
Alternatives: When Not to Use Codex
Codex isn't always the best choice. If you have a simple workspace with a few notes, manual conversion is faster. If you're uncomfortable with command-line tools, a GUI tool like Notion-to-Obsidian Converter (a web app) might be easier. Also, if you're migrating to Obsidian for privacy reasons, you might prefer a script that runs fully offline—Codex's local CLI fits this, but the cloud version doesn't.
Another alternative is to start fresh in Obsidian and only import essential notes. This avoids conversion headaches but loses history.
Frequently Asked Questions
Does Codex work with Notion's database views? No, Codex can't recreate database views (like board or calendar) because they're Notion-specific. It converts database content to Markdown tables or properties. You'll need to use Obsidian's Dataview plugin to recreate dynamic views.
Will my Notion attachments (images, PDFs) be preserved? Yes, if you export with “Include subpages” and “Create folders for subpages,” attachments are included. Codex can move them to an attachments folder and update links.
Can I migrate my Notion pages with comments or mentions? Notion exports don't include comments or mentions. You'll lose those. Codex can't recover data Notion doesn't export.
Is it possible to migrate without coding knowledge? Yes, because Codex writes the code for you. You only need to describe what you want in plain English. Basic computer skills are sufficient.
How long does the migration take? For a typical workspace (under 500 notes), 30–90 minutes including review. Larger or more complex workspaces may take a few hours.
What if I want to keep my Notion workspace as well? You can. The migration creates a copy of your data. You can continue using Notion and sync changes manually or with a tool like Obsidian's Sync plugin.