Notion Workspace

👤 fr3kstyle 📦 v1.0.0 ⭐ 4.2 ⬇️ 718 下載
💻 開發程式設計 免費 🔑 需 API Key

📖 技能介紹


name: notion-workspace description: Full Notion API skill — query databases, manage pages, append blocks, and search your entire workspace.

7w4.net提供免費和付費技能下載。


Notion Workspace

Automate your Notion workspace from the command line. Query and update databases, create and archive pages, append rich content blocks, and search across your entire workspace — all via the official Notion API with a single integration token.

Setup

export NOTION_API_KEY="secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export NOTION_DATABASE_ID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"   # optional default DB

Get your integration token: Notion → Settings → Connections → Develop or manage integrations → New integration. Then share your database/pages with that integration.

Commands / Usage

# ── DATABASES ───────────────────────────────────────────
# Query a database (uses NOTION_DATABASE_ID by default)
python3 scripts/notion_workspace.py db-query
python3 scripts/notion_workspace.py db-query --db-id "abc123..."

# Query with filter
python3 scripts/notion_workspace.py db-query --filter-prop "Status" --filter-value "In Progress"

# Create a new entry (page) in a database
python3 scripts/notion_workspace.py db-create --title "My Task" --props '{"Status": "To Do", "Priority": "High"}'

# Update a database entry
python3 scripts/notion_workspace.py db-update --page-id "def456..." --props '{"Status": "Done"}'

# ── PAGES ───────────────────────────────────────────────
# Create a standalone page (under a parent page)
python3 scripts/notion_workspace.py page-create --parent-id "ghi789..." --title "Meeting Notes" --content "Today we discussed..."

# Read a page (metadata + content preview)
python3 scripts/notion_workspace.py page-read --page-id "def456..."

# Update page title/properties
python3 scripts/notion_workspace.py page-update --page-id "def456..." --title "Updated Title"

# Archive (soft-delete) a page
python3 scripts/notion_workspace.py page-archive --page-id "def456..."

# ── BLOCKS ──────────────────────────────────────────────
# Get children blocks of a page or block
python3 scripts/notion_workspace.py blocks-get --block-id "def456..."

# Append a paragraph block
python3 scripts/notion_workspace.py blocks-append --block-id "def456..." --text "New paragraph content here"

# Append a heading
python3 scripts/notion_workspace.py blocks-append --block-id "def456..." --text "Section Title" --type heading_2

# Append a to-do item
python3 scripts/notion_workspace.py blocks-append --block-id "def456..." --text "Complete this task" --type to_do

# Append a bulleted list item
python3 scripts/notion_workspace.py blocks-append --block-id "def456..." --text "Bullet point" --type bulleted_list_item

# Append a code block
python3 scripts/notion_workspace.py blocks-append --block-id "def456..." --text "print('hello')" --type code --language python

# ── SEARCH ──────────────────────────────────────────────
# Search entire workspace
python3 scripts/notion_workspace.py search --query "project roadmap"

# Search only pages
python3 scripts/notion_workspace.py search --query "meeting notes" --filter page

# Search only databases
python3 scripts/notion_workspace.py search --query "tasks" --filter database

Requirements

  • Python 3.8+
  • requests (pip install requests)
  • NOTION_API_KEY environment variable
  • NOTION_DATABASE_ID environment variable (optional, for default DB commands)

🤖 AI 評測

這個 Skill 質量不錯,功能覆蓋全面,文件清晰易懂。它能幫助使用者通過命令列操作 Notion 的資料庫、頁面和內容塊,搜尋工作區也很方便。優點是操作直觀、示例詳細;不足之處在於大數據庫查詢可能不全、支援的屬性型別有限、偶爾遇到網路問題缺少友好提示。日常簡單使用足夠,但複雜場景可能需要其他工具配合。

📊 多維度評分

適應性4.4
規範性4
有效性4.3
可靠性4.2
可信度4.3

📁 包含檔案 (3 個)

📄 SKILL.md 3.7 KB
📄 _meta.json 135 B
📄 scripts/notion_workspace.py 10.1 KB