notion-agent

Notion integration for OpenClaw. Manage pages, databases, and blocks via AI agent.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "notion-agent" with this command: npx skills add ChloePark85/notion-agent

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 <command> [options]

Page Operations

Create a page:

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

Get a page:

uv run {baseDir}/scripts/notion.py page get <page_id>

Update a page:

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

Delete (archive) a page:

uv run {baseDir}/scripts/notion.py page delete <page_id>

List child pages:

uv run {baseDir}/scripts/notion.py page list --parent <page_id>

Database Operations

Query a database:

# Simple query
uv run {baseDir}/scripts/notion.py db query <db_id>

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

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

Add page to database:

uv run {baseDir}/scripts/notion.py db add <db_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 <page_id> \
  --type paragraph \
  --text "This is a paragraph"

Append to-do:

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

Append heading:

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

Append code block:

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

List child blocks:

uv run {baseDir}/scripts/notion.py block children <block_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 <workspace_root_id> \
  --title "Meeting Notes - 2026-03-10" \
  --content "Attendees: Team"

Add task to project database:

uv run {baseDir}/scripts/notion.py db add <project_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 <parent> --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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Nango API Integration

Connect AI agents to 700+ external APIs using Nango. Handles OAuth, authentication flows, and tool calling for any API. Use when integrating agents with exte...

Registry SourceRecently Updated
Automation

Video Remix

Enables remixing video content by editing, combining, or transforming video files for creative or production workflows.

Registry SourceRecently Updated
Automation

Flowdo

Task and workflow manager with kanban-style status tracking. Add tasks, move them through workflow states (todo, doing, done, blocked), set priority levels,...

Registry SourceRecently Updated
1020ckchzh
Automation

Dropship Helper

代发货助手。一件代发、供应商选择、产品选品、利润计算、物流方案、风险控制。Dropshipping helper. 代发货、一件代发、跨境电商。

Registry SourceRecently Updated
1740Profile unavailable