Back to list
my-entourage

import-notion

by my-entourage

MyEntourage.dev agent skills to have all of your AI agent context across communication channels in one place in sync.

2🍴 0📅 Jan 21, 2026

SKILL.md


name: import-notion description: Import pages from Notion workspace to local markdown files

Import Notion

Export and convert Notion workspace pages to local markdown files for use in context repositories.

When to Use

  • After making changes in Notion that should be synced locally
  • When setting up a new context repository with Notion data
  • Periodically to keep local copies in sync

Configuration

Supports two config locations (checked in order):

~/.claude/notion-exporter.config.json:

{
  "spaces": {
    "viran": {
      "targetPath": "~/Documents/code/@orgs/viranhq/viran-context",
      "rawExportPath": "temp/notion-raw",
      "outputPath": "data/documents/notion",
      "apiKeyEnvVar": "NOTION_API_KEY_VIRAN",
      "excludePatterns": ["^Archived", "^Trash"]
    },
    "entourage": {
      "targetPath": "~/Documents/code/@orgs/my-entourage/entourage-context",
      "rawExportPath": "temp/notion-raw",
      "outputPath": "data/documents/notion",
      "apiKeyEnvVar": "NOTION_API_KEY_ENTOURAGE"
    }
  }
}

Option 2: Project-local config

.entourage/notion.config.json:

{
  "apiKeyEnvVar": "NOTION_API_KEY_PROJECTNAME",
  "targetPath": ".",
  "rawExportPath": "temp/notion-raw",
  "outputPath": "data/documents/notion",
  "excludePatterns": ["Archive", "Template"]
}

API keys are stored in ~/.claude/.env:

NOTION_API_KEY_VIRAN=secret_xxx
NOTION_API_KEY_ENTOURAGE=secret_xxx

Prerequisites

  1. Notion Integration: Create at https://www.notion.so/my-integrations

    • One integration per workspace
    • Share specific pages with the integration
  2. Python Environment: The skill will set up a venv on first run

Workflow

Step 1: Check Configuration

  1. Check for ~/.claude/notion-exporter.config.json (global)
  2. If not found, check .entourage/notion.config.json (project-local)
  3. If neither found, guide user through setup wizard

Step 2: Setup Python Environment

  1. Check if venv exists at ~/.claude/venvs/notion-exporter/
  2. If not, create and install dependencies:
    python3 -m venv ~/.claude/venvs/notion-exporter
    ~/.claude/venvs/notion-exporter/bin/pip install -r {skill_dir}/scripts/requirements.txt
    

Step 3: Export from Notion

Run the exporter:

~/.claude/venvs/notion-exporter/bin/python {skill_dir}/scripts/exporter.py [space-name]

Output: {rawExportPath}/{date}/export.json

Step 4: Convert to Markdown

Run the converter:

~/.claude/venvs/notion-exporter/bin/python {skill_dir}/scripts/converter.py [space-name]

Output:

  • {outputPath}/*.md - Markdown files following Notion hierarchy
  • {outputPath}/_assets/ - Downloaded images and files

Step 5: Report Results

## Import Complete

Exported from Notion:
- Pages: 42
- Databases: 3
- Assets: 15

Converted to Markdown:
- Files created: 45
- Assets downloaded: 15
- Location: data/documents/notion/

Run `/update-timeline` to process these files.

Output Structure

data/documents/notion/
├── _assets/
│   ├── logo.png
│   └── diagram.svg
├── Product/
│   ├── Roadmap.md
│   └── Features/
│       └── Feature-A.md
└── Team/
    └── Meeting-Notes.md

temp/notion-raw/
└── 2026-01-15/
    └── export.json          # Raw API response (not tracked in git)
  • Folder structure mirrors Notion hierarchy
  • Database entries nest under their Notion parent pages
  • Assets stored in _assets/ with local path references in frontmatter

Error Handling

  • No config: Guide through setup wizard
  • Invalid API key: Report authentication error with link to Notion integrations
  • Rate limited: Report and suggest waiting
  • Python not found: Report requirement for Python 3.8+

Execution Behavior

This skill returns results to the calling context and does NOT stop execution.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon