Notion Workspace

👤 mrnsmh 📦 v0.1.0 ⭐ 4.1 ⬇️ 1.2K 下載
🤖 AI-Agent 免費 🔑 需 API Key

📖 技能介紹


name: notion-workspace description: Manage Notion workspace — search pages, read content, create pages in databases, append blocks, and list databases. Uses Notion REST API directly via urllib/requests. license: MIT metadata: author: Jack2 version: 1.0.0 tags: notion, productivity, notes, database env: NOTION_TOKEN


notion-workspace Skill

Manage your Notion workspace from the CLI or as an importable Python module.

Setup

Set your Notion integration token:

export NOTION_TOKEN=ntn_...

Or the default token embedded in the script will be used.

Make sure your Notion integration has access to the pages/databases you want to use.
In Notion: open a page → Share → Invite your integration.

Usage

python3 scripts/notion.py search "project notes"
python3 scripts/notion.py search "budget" --type database

Read a Page

# Metadata only
python3 scripts/notion.py read PAGE_ID

# With block content
python3 scripts/notion.py read PAGE_ID --blocks

Create a Page in a Database

python3 scripts/notion.py create DATABASE_ID --title "New Page Title"

# With extra properties
python3 scripts/notion.py create DATABASE_ID --title "Task" --props '{"Status": {"select": {"name": "In Progress"}}}'

Append Text to a Page

python3 scripts/notion.py append PAGE_ID --text "New paragraph content"

List Databases

python3 scripts/notion.py databases

As a Python Module

from scripts.notion import search, read_page_content, create_page, append_blocks, list_databases

# Search
results = search("meeting notes")
for item in results["results"]:
    print(item["id"], item["object"])

# Read page + blocks
data = read_page_content("PAGE_ID")
print(data["page"])
print(data["blocks"])

# Create page
page = create_page("DATABASE_ID", "My New Page")
print(page["url"])

# Append text
append_blocks("PAGE_ID", "This is a new paragraph.")

# List databases
dbs = list_databases()

7w4.net小蔥技能站,你的AI助手技能庫。

Files

File Purpose
scripts/notion.py CLI + importable module
references/notion-api.md Notion API quick reference

Notes

  • Uses urllib (stdlib only, no SDK needed)
  • Notion API version: 2022-06-28
  • Rate limit: ~3 req/sec
  • Page IDs can be with or without dashes (both work)

🤖 AI 評測

這個 Skill 整體質量不錯,功能覆蓋了 Notion 的常用操作,文件清晰且使用方便,能同時作為命令列工具和 Python 模組匯入。主要問題是安全性方面有隱患——預設 token 被寫死在程式碼裡,存在風險。另外追加內容的功能比較單一,只能新增普通文本段落,不支援標題、列表等其他格式。如果開發者在這些方面改進一下,會是一個相當實用的 Notion 管理工具。

📊 多維度評分

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

📁 包含檔案 (5 個)

📄 SKILL.md 2.3 KB
📄 _meta.json 150 B
📄 references/notion-api.md 1.6 KB
📄 scripts/notion.py 6.4 KB
📄 skill-card.md 2 KB