← 返回 Skills 市场
chloepark85

Notion Agent

作者 Chloe Park · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
327
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install notion-agent
功能描述
Notion integration for OpenClaw. Manage pages, databases, and blocks via AI agent.
使用说明 (SKILL.md)

Notion Agent

OpenClaw skill for managing Notion workspaces via AI agents. Provides CLI commands for pages, databases, blocks, and search.

Setup

  1. Create a Notion Integration:

  2. Set environment variable:

    export NOTION_TOKEN=your_integration_token_here
    
  3. Share pages/databases with your integration:

    • Open the page or database in Notion
    • Click "..." → "Add connections"
    • Select your integration

Usage

All commands use the pattern:

uv run {baseDir}/scripts/notion.py \x3Ccommand> [options]

Page Operations

Create a page:

uv run {baseDir}/scripts/notion.py page create \
  --parent \x3Cparent_page_id> \
  --title "My New Page" \
  --content "Initial paragraph content"

Get a page:

uv run {baseDir}/scripts/notion.py page get \x3Cpage_id>

Update a page:

uv run {baseDir}/scripts/notion.py page update \x3Cpage_id> \
  --title "Updated Title"

Delete (archive) a page:

uv run {baseDir}/scripts/notion.py page delete \x3Cpage_id>

List child pages:

uv run {baseDir}/scripts/notion.py page list --parent \x3Cpage_id>

Database Operations

Query a database:

# Simple query
uv run {baseDir}/scripts/notion.py db query \x3Cdb_id>

# With filter
uv run {baseDir}/scripts/notion.py db query \x3Cdb_id> --filter Name=Todo

# With sort
uv run {baseDir}/scripts/notion.py db query \x3Cdb_id> --sort Priority:desc

Add page to database:

uv run {baseDir}/scripts/notion.py db add \x3Cdb_id> \
  --props '{"Name":{"title":[{"text":{"content":"Task"}}]},"Status":{"select":{"name":"Done"}}}'

List all databases:

uv run {baseDir}/scripts/notion.py db list

Block Operations

Append paragraph:

uv run {baseDir}/scripts/notion.py block append \x3Cpage_id> \
  --type paragraph \
  --text "This is a paragraph"

Append to-do:

uv run {baseDir}/scripts/notion.py block append \x3Cpage_id> \
  --type todo \
  --text "Task to complete" \
  --checked

Append heading:

uv run {baseDir}/scripts/notion.py block append \x3Cpage_id> \
  --type heading1 \
  --text "Section Title"

Append code block:

uv run {baseDir}/scripts/notion.py block append \x3Cpage_id> \
  --type code \
  --text "print('Hello, World!')" \
  --language python

List child blocks:

uv run {baseDir}/scripts/notion.py block children \x3Cblock_id>

Search

Search workspace:

# Search all
uv run {baseDir}/scripts/notion.py search "project plan"

# Search only pages
uv run {baseDir}/scripts/notion.py search "meeting notes" --type page

# Search only databases
uv run {baseDir}/scripts/notion.py search "tasks" --type database

Error Handling

The CLI handles common errors:

  • NOTION_TOKEN not set — Set the environment variable
  • Invalid NOTION_TOKEN — Check your integration token
  • Resource not found — Page/database doesn't exist or integration lacks access
  • Permission denied — Share the resource with your integration

API Reference

  • Base URL: https://api.notion.com/v1
  • API Version: 2022-06-28
  • Authentication: Bearer token via NOTION_TOKEN

Limitations

  • Uses requests library only (no Notion SDK)
  • Simple filter/sort syntax (single property)
  • Rich text limited to plain text content
  • Database properties must be formatted as JSON

Examples for AI Agents

Create a meeting notes page:

uv run {baseDir}/scripts/notion.py page create \
  --parent \x3Cworkspace_root_id> \
  --title "Meeting Notes - 2026-03-10" \
  --content "Attendees: Team"

Add task to project database:

uv run {baseDir}/scripts/notion.py db add \x3Cproject_db_id> \
  --props '{"Name":{"title":[{"text":{"content":"Fix bug #123"}}]},"Status":{"select":{"name":"In Progress"}},"Priority":{"select":{"name":"High"}}}'

Build a structured page:

PAGE_ID=$(uv run {baseDir}/scripts/notion.py page create --parent \x3Cparent> --title "Report" | jq -r .id)
uv run {baseDir}/scripts/notion.py block append $PAGE_ID --type heading1 --text "Executive Summary"
uv run {baseDir}/scripts/notion.py block append $PAGE_ID --type paragraph --text "Key findings..."
uv run {baseDir}/scripts/notion.py block append $PAGE_ID --type heading2 --text "Details"
uv run {baseDir}/scripts/notion.py block append $PAGE_ID --type todo --text "Review findings"

Help

uv run {baseDir}/scripts/notion.py --help
uv run {baseDir}/scripts/notion.py page --help
uv run {baseDir}/scripts/notion.py db --help
uv run {baseDir}/scripts/notion.py block --help
安全使用建议
This skill appears coherent, but before installing: (1) Treat your NOTION_TOKEN as a secret — create a Notion 'Internal Integration' with minimal access and only share the specific pages/databases the integration needs. (2) Review the included scripts yourself (they are small and human-readable) and confirm API calls target https://api.notion.com. (3) The README suggests installing 'uv' via a curl | sh command; prefer installing 'uv' from a trusted source or review the install script before running it. (4) Rotate the token if it may be exposed, and avoid pasting tokens into chats or public repos. (5) If you plan to allow autonomous agent actions, be aware the agent (with this skill) can perform Notion operations with whatever access the token grants — limit the integration scope accordingly.
功能分析
Type: OpenClaw Skill Name: notion-agent Version: 1.0.1 The notion-agent skill is a legitimate integration for managing Notion workspaces via the official Notion API (api.notion.com). The codebase consists of a clean, modular Python implementation (lib/client.py, lib/pages.py, etc.) and a CLI wrapper (scripts/notion.py) that performs standard CRUD operations on pages, databases, and blocks. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description, required binary (uv), primary credential (NOTION_TOKEN), and the included Python CLI and library files all align with a Notion API integration. The code calls api.notion.com and implements pages, databases, blocks, and search as described.
Instruction Scope
SKILL.md instructs the agent to run the bundled CLI via 'uv' and to set NOTION_TOKEN. It does not instruct reading unrelated system files, other credentials, or exfiltrating data to non-Notion endpoints. Error messages and usage are narrowly scoped to Notion operations.
Install Mechanism
There is no automatic install spec (instruction-only), which minimizes installation risk. The package includes source code and a pyproject listing 'requests' only. The README suggests installing 'uv' via a curl command; that is a separate user action and should be treated as normal operational advice rather than an automatic installer embedded in the skill.
Credentials
Only the Notion integration token (NOTION_TOKEN) is required as the primary credential. No unrelated secrets, config paths, or broad environment access are requested. This is proportionate to the described functionality.
Persistence & Privilege
The skill does not request permanent/always-on inclusion and does not modify other skills or system-wide settings. Autonomous invocation is allowed by default (normal for skills) but not combined with broad privileges here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install notion-agent
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /notion-agent 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
v1.0.1: Notion integration for OpenClaw - pages, databases, blocks, search
v1.0.0
Initial release: Notion integration for OpenClaw. Pages, databases, blocks, search.
元数据
Slug notion-agent
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Notion Agent 是什么?

Notion integration for OpenClaw. Manage pages, databases, and blocks via AI agent. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 327 次。

如何安装 Notion Agent?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install notion-agent」即可一键安装,无需额外配置。

Notion Agent 是免费的吗?

是的,Notion Agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Notion Agent 支持哪些平台?

Notion Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Notion Agent?

由 Chloe Park(@chloepark85)开发并维护,当前版本 v1.0.1。

💬 留言讨论