---
name: notion-to-markdown
description: Directly convert Notion pages to Obsidian-friendly Markdown using MCP fetch and local processing. Use this skill when you need to migrate specific Notion pages identified by URL or ID into the local Obsidian vault, ensuring LaTeX normalization, image localization, and property-to-frontmatter mapping.
---

# Notion to Markdown

This skill provides a high-level workflow for fetching live Notion pages and converting them into clean, localized Markdown files suitable for an Obsidian vault.

## Overview

Unlike bulk migration from exports, this skill leverages the Notion MCP (`notion-fetch`) to retrieve page content directly and then uses the `stable_jarvis.notion_to_obsidian` toolkit to perform surgical processing.

## Execution Workflow

### Step 1: Precise Identification
Use `notion-search` to find the exact page ID or URL.
```bash
# Example search
notion-search query="Leveraging Skills from Unlabeled Prior Data"
```

### Step 2: Fetch and Save Content
Retrieve the raw Notion content and save it to a temporary JSON file.
```bash
# Fetch content via MCP
notion-fetch id="[PAGE_ID]" > temp_fetch.json
```

### Step 3: Local Processing
Run the migration script to convert the JSON content to localized Markdown.
```bash
python skills/notion-to-markdown/scripts/migrate.py temp_fetch.json [OUTPUT_DIR]
```

### Step 4: Verification and Refinement
Inspect the output Markdown. Notion content can sometimes be "jammed" or have deep indentation that script-based normalization might miss. Use the `replace` tool to:
- **Normalize Indentation**: Ensure consistent 2 or 4-space indentation for nested blocks.
- **Fix Block Spacing**: Ensure double newlines exist between headings, details blocks, and paragraphs.
- **Verify Equations**: Check that all `$$` blocks are correctly populated with recovered LaTeX.
- **Final Polish**: Remove any redundant HTML tags or artifacts (e.g., empty `<span>` tags).

## Key Capabilities

- **LaTeX Normalization**: Converts Notion's `$ \dots $` and `$ \dots $` to standard `$...$` and `$$...$$` syntax.
- **Image Localization**: Automatically detects and downloads Notion S3-hosted images, saving them to a local `assets/` folder and updating Markdown links.
- **Frontmatter Mapping**: Extracts Notion properties (Status, Tags, Journal Name, etc.) and maps them to YAML frontmatter.
- **Style Conversion**: Transforms Notion-specific spans (e.g., color backgrounds) to Obsidian highlights (`==text==`).

## Dependencies

- **Conda Environment**: Must use the `jarvis` environment (`conda activate jarvis`).
- **`notion-fetch` MCP Tool**: Required to retrieve page data.
- **`stable_jarvis` package**: Must be installed in editable mode (`pip install -e .`) within the `jarvis` environment.
- **`httpx`**: Used for reliable image downloads.

## Troubleshooting

- **Expired Image URLs**: Notion S3 URLs are temporary. Ensure the `migrate.py` script is run immediately after `notion-fetch`.
- **Missing Content**: If the fetch result is truncated, ensure you are capturing the full output of the `notion-fetch` tool.


---
Source attribution: JaimeParker
Original project: https://github.com/JaimeParker/stable-jarvis/blob/cb2c7078e8b76a3125ae504aeb1ffa9c1ee2dc4b/skills/notion-to-markdown/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Zhaohong Liu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: JaimeParker
Original project: https://github.com/JaimeParker/stable-jarvis/blob/cb2c7078e8b76a3125ae504aeb1ffa9c1ee2dc4b/skills/notion-to-markdown/SKILL.md
Attribution basis: Source repository record

Fields of work: Design, Marketing
Roles: Content Marketer, SEO Specialist, UX Writer
Specialties: API, Notion
Tools: Notion, Obsidian
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 11daf7921e79327aebdfc0ae06550d3b87f5e2183347c5d308c518a15e77b9d6
