banana-sync-to-notion

Sync local Markdown files to Notion with full formatting support. Use when user wants to backup, sync, or migrate files to Notion, mentions uploading to Notion, or says sync to Notion. Features include: (1) Recursive directory structure preservation, (2) Complete Markdown formatting (bold, italic, code, links, lists, tables, callouts), (3) Automatic emoji icons based on filenames, (4) Duplicate detection for incremental syncs, (5) Smart chunking for large files, (6) Relative link conversion to Notion page links. Requires Notion API token and target page ID configured in .env file.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "banana-sync-to-notion" with this command: npx skills add treydong/banana-skills/treydong-banana-skills-banana-sync-to-notion

Banana Sync to Notion

Automatically sync local Markdown files to Notion while preserving directory structure and full Markdown formatting.

Setup

Before using this skill:

  1. Install dependencies in the skill directory:

    cd banana-sync-to-notion
    npm install
    
  2. Configure environment variables by creating a .env file:

    NOTION_TOKEN=your_notion_integration_token
    NOTION_ROOT_PAGE_ID=target_page_id
    
    • NOTION_TOKEN: Get from Notion Integrations
    • NOTION_ROOT_PAGE_ID: The parent page ID where files will be synced
    • Ensure the integration has read/write permissions to the target page

Usage

Sync Files to Notion

Run from the skill directory:

npm run sync:notion

This command:

  • Recursively scans the source directory (default: Files/ in project root)
  • Converts Markdown files to Notion blocks
  • Preserves directory hierarchy as nested pages
  • Assigns emoji icons based on filenames
  • Skips existing pages (incremental sync)
  • Shows detailed progress and statistics

Clean Notion Pages

Remove all child pages under the target page:

npm run clean:notion

Use this before a fresh re-sync.

Re-sync Everything

Clean existing content and sync fresh:

npm run resync:notion

Combines clean:notion + sync:notion.

Markdown Support

All standard Markdown syntax is converted to native Notion blocks:

SyntaxNotion Output
**bold** or __bold__Bold text
*italic* or _italic_Italic text
***bold italic***Bold italic
`code`Inline code
[text](url)Clickable link (http/https only)
```language ... ```Code block
- item or * itemBullet list
1. itemNumbered list
> quoteQuote block
> 💡 noteCallout (emoji-prefixed quotes)
--- or ***Divider
Markdown tablesNative Notion tables

Relative Links:

  • ./file.md or ../folder/file.md → Converted to Notion page links
  • ./image.png → Preserved as text (no local file upload)
  • http://... → Clickable external links

Automatic Icon Selection

The script assigns emoji icons based on filename patterns:

  • 📖 Chapters (e.g., "01-intro.md")
  • 🎯 Getting started, basics
  • ❓ FAQ, troubleshooting, problems
  • 💡 Examples, case studies
  • 🔧 Tools, utilities
  • 📚 Methods, tutorials
  • 📊 Data, analysis, reports
  • ⚙️ Configuration, settings
  • 🏗️ Architecture, system
  • 💻 Scripts, code
  • ✍️ Writing, creative
  • 📝 Notes, records
  • 🚀 Advanced, recommendations
  • 📋 Guides
  • 📘 README files
  • 📦 Downloads, resources
  • 🎨 Presentations
  • 📄 Default (no match)

Customize icons by editing the selectIcon function in scripts/sync-notion.js.

Smart Features

Duplicate Detection: Automatically skips pages that already exist with the same title, enabling incremental syncs without duplicates.

Smart Chunking:

  • Handles Notion's 2000-character limit per block
  • Supports files with >100 blocks
  • Batches API requests to avoid rate limits
  • Automatic retry on temporary failures

Progress Reporting: Shows detailed statistics during sync:

  • Files processed
  • Files created vs skipped
  • Folders created
  • Duration and errors

Output Example

🚀 Starting Notion Sync...
📂 Source: /path/to/Files
📄 Target Page: My Knowledge Base

📁 Syncing directory: Files
  ✨ Creating: 📖 01-Introduction
  📁 Syncing directory: 01-Introduction
    ✨ Creating: 📖 01-overview.md
    ⏭️  Skipping existing: 02-concepts.md
    ✨ Creating: 🎯 03-quickstart.md

==================================================
✅ Sync Complete!
==================================================
⏱️  Duration: 45.2s
📊 Statistics:
   • Files processed: 35
   • Files created: 25
   • Files skipped: 10
   • Folders created: 5
   • Errors: 0
==================================================

File Structure

banana-sync-to-notion/
├── SKILL.md
├── .env (user created)
├── package.json
├── scripts/
│   ├── sync-notion.js   # Main sync logic
│   └── clean-notion.js  # Cleanup utility
└── Files/ (default source directory)

Troubleshooting

Image support: Current version focuses on text/Markdown. Images require hosted URLs (image hosting) to display in Notion. Local image upload requires more complex authentication.

Missing icons: Files that don't match any icon pattern use the default 📄 emoji. Add custom patterns in scripts/sync-notion.js.

Rate limits: The script includes automatic retry logic for Notion API rate limits. Large syncs (>100 files) may take several minutes.

Relative links not working: Ensure the linked Markdown file was also synced. Links only work to pages that exist in Notion.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

banana-skill-finder

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated