← 返回
内容创作 Key 中文

Notion Workspace

Manage Notion workspace — search pages, read content, create pages in databases, append blocks, and list databases. Uses Notion REST API directly via urllib/...
管理 Notion 工作区:搜索页面、读取内容、在数据库中创建页面、追加区块及列出数据库。通过 urllib 直接调用 Notion REST API。
mrnsmh
内容创作 clawhub v0.1.0 1 版本 99881.9 Key: 需要
★ 0
Stars
📥 846
下载
💾 31
安装
1
版本
#latest

概述

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

Search

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()

Files

FilePurpose
---------------
scripts/notion.pyCLI + importable module
references/notion-api.mdNotion 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)

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 19:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,224
productivity

Nexus Sentinel

mrnsmh
自主监控服务器健康状况,优化资源,执行上下文感知恢复,生成状态报告,并在关键文件变更时触发备份。
★ 0 📥 976
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,518