首页龙虾技能列表 › Notion — 笔记数据库管理

📝 Notion — 笔记数据库管理

v1.0.0

通过 Notion API 创建和管理页面、数据库和块内容,实现笔记和知识库的自动化操作。

227· 75,800·2132 当前·2186 累计·💬 3
by @steipete (Peter Steinberger)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/10
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
该技能的指令与 Notion API 助手功能匹配,但元数据未声明敏感配置路径/凭证,且技能来源未知——这种不匹配和明文密钥指导令人担忧。
评估建议
此技能看似是一个简单的 Notion API 助手,但 SKILL.md 期望将 Notion API 密钥存储在 ~/.config/notion/api_key,而注册表元数据未声明该配置路径或任何主凭证。安装前:(1) 确认技能发布者/来源(技能列出来源未知),(2) 避免使用 echo 将密钥存储为明文——考虑使用平台的密钥库或环境变量,(3) 验证代理是否被允许访问 ~/.config/notion(以及自主代理调用是否可接受),(4) 要求更新技能元数据以声明配置路径或主凭证,使行为明确。如果发布者无法证明缺失元数据的合理性,或您无法限制密钥存储位置,请将该技能视为有风险。...
详细分析 ▾
用途与能力
名称/描述与 SKILL.md 匹配:文档说明如何调用 Notion API 创建/读取/更新页面、数据源和块。curl 示例和 Notion 端点与所述目的一致。
指令范围
运行时指令明确告诉用户/代理将 Notion API 密钥存储在 ~/.config/notion/api_key 并从该位置读取,然后在 Authorization 头中使用。这种行为对于 Notion 集成是预期的,但文档还给出了明确的明文存储模式(echo 到文件),这存在风险——且该技能给代理提供了直接读取该文件的 shell 风格命令。
安装机制
纯指令技能,无安装规范,无代码文件——安装风险最低。安装程序不会下载或写入任何内容。
凭证需求
注册表元数据未列出所需环境变量、主凭证或所需配置路径,但 SKILL.md 既指导创建 API 密钥又读取特定配置文件 (~/.config/notion/api_key)。这种不匹配(指令中存在凭证/配置使用但未在元数据中声明)以及将 API 密钥存储为明文的指导是不成比例的,应予以澄清。
持久化与权限
always:false 和默认自主调用是正常的。该技能不请求持久化系统级权限。然而,由于该技能的指令访问本地密钥文件,自主调用结合未声明的凭证是需要考虑的额外风险。
安装前注意事项
  1. 确认技能发布者/来源(技能列出来源未知)
  2. 避免使用 echo 将密钥存储为明文——考虑使用平台的密钥库或环境变量
  3. 验证代理是否被允许访问 ~/.config/notion(以及自主代理调用是否可接受)
  4. 要求更新技能元数据以声明配置路径或主凭证,使行为明确。如果发布者无法证明缺失元数据的合理性,或您无法限制密钥存储位置,请将该技能视为有风险
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/1/5
● 无害

安装命令 点击复制

官方npx clawhub@latest install notion
镜像加速npx clawhub@latest install notion --registry https://www.longxiaskill.com

技能文档

Use the Notion API to create/read/update pages, data sources (databases), and blocks.

Setup

  • 创建 integration 在 https://notion.所以/my-integrations
  • 复制 API 键 (starts 带有 ntn_secret_)
  • Store :
mkdir -p ~/.config/notion
echo "ntn_your_key_here" > ~/.config/notion/api_key
  • 分享 target pages/databases 带有 integration (click "..." → "Connect 到" → integration name)

API Basics

All requests need:

NOTION_KEY=$(cat ~/.config/notion/api_key)
curl -X GET "https://api.notion.com/v1/..." \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json"
Note: The Notion-Version header is required. This skill uses 2025-09-03 (latest). In this version, databases are called "data sources" in the API.

Common Operations

搜索 对于 pages 和 data sources:

curl -X POST "https://api.notion.com/v1/search" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"query": "page title"}'

获取 page:

curl "https://api.notion.com/v1/pages/{page_id}" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03"

获取 page content (blocks):

curl "https://api.notion.com/v1/blocks/{page_id}/children" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03"

创建 page 在...中 data source:

curl -X POST "https://api.notion.com/v1/pages" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": {"database_id": "xxx"},
    "properties": {
      "Name": {"title": [{"text": {"content": "New Item"}}]},
      "Status": {"select": {"name": "Todo"}}
    }
  }'

查询 data source (数据库):

curl -X POST "https://api.notion.com/v1/data_sources/{data_source_id}/query" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {"property": "Status", "select": {"equals": "Active"}},
    "sorts": [{"property": "Date", "direction": "descending"}]
  }'

创建 data source (数据库):

curl -X POST "https://api.notion.com/v1/data_sources" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": {"page_id": "xxx"},
    "title": [{"text": {"content": "My Database"}}],
    "properties": {
      "Name": {"title": {}},
      "Status": {"select": {"options": [{"name": "Todo"}, {"name": "Done"}]}},
      "Date": {"date": {}}
    }
  }'

更新 page properties:

curl -X PATCH "https://api.notion.com/v1/pages/{page_id}" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"properties": {"Status": {"select": {"name": "Done"}}}}'

添加 blocks 到 page:

curl -X PATCH "https://api.notion.com/v1/blocks/{page_id}/children" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{
    "children": [
      {"object": "block", "type": "paragraph", "paragraph": {"rich_text": [{"text": {"content": "Hello"}}]}}
    ]
  }'

属性 Types

Common property formats for database items:

  • Title: {"title": [{"text": {"content": "..."}}]}
  • Rich text: {"rich_text": [{"text": {"content": "..."}}]}
  • Select: {"select": {"name": "选项"}}
  • Multi-select: {"multi_select": [{"name": ""}, {"name": "B"}]}
  • 日期: {"日期": {"开始": "2024-01-15", "end": "2024-01-16"}}
  • Checkbox: {"checkbox": 真}
  • 数字: {"数字": 42}
  • URL: {"url": "https://..."}
  • Email: {"email": "@b.com"}
  • Relation: {"relation": [{"id": "page_id"}]}

键 Differences 在...中 2025-09-03

  • Databases → Data Sources: 使用 /data_sources/ endpoints 对于 queries 和 retrieval
  • Two IDs: 每个 数据库 现在 有 both database_iddata_source_id
- 使用 database_id 当...时 creating pages (parent: {"database_id": "..."}) - 使用 data_source_id 当...时 querying (POST /v1/data_sources/{id}/查询)
  • 搜索 results: Databases return 作为 "对象": "data_source" 带有 data_source_id
  • Parent 在...中 responses: Pages show parent.data_source_id alongside parent.database_id
  • Finding data_source_id: 搜索 对于 数据库, 或 call 获取 /v1/data_sources/{data_source_id}

Notes

  • Page/数据库 IDs UUIDs (带有 或 没有 dashes)
  • API cannot 设置 数据库 视图 filters — 's UI-仅
  • Rate limit: ~3 requests/第二个 平均值
  • 使用 is_inline: 真 当...时 creating data sources 到 embed them 在...中 pages
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务