skills$openclaw/notion
moikapy7.4k

by moikapy

notion – OpenClaw Skill

notion is an OpenClaw Skills integration for coding workflows. Integrate with Notion workspaces to read pages, query databases, create entries, and manage content. Perfect for knowledge bases, project tracking, content calendars, CRMs, and collaborative documentation. Works with any Notion page or database you explicitly share with the integration.

7.4k stars5.9k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namenotion
descriptionIntegrate with Notion workspaces to read pages, query databases, create entries, and manage content. Perfect for knowledge bases, project tracking, content calendars, CRMs, and collaborative documentation. Works with any Notion page or database you explicitly share with the integration. OpenClaw Skills integration.
ownermoikapy
repositorymoikapy/openclaw-notion-skill
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @moikapy/openclaw-notion-skill
last updatedFeb 7, 2026

Maintainer

moikapy

moikapy

Maintains notion in the OpenClaw Skills directory.

View GitHub profile
File Explorer
22 files
.
src
cli.ts
6.5 KB
index.ts
2.0 KB
templates
examples
content-scout-example.js
2.2 KB
README.md
1.2 KB
content-pipeline.json
2.6 KB
crm-3d-printing.json
3.9 KB
knowledge-base.json
2.6 KB
project-tracker.json
2.9 KB
README.md
6.8 KB
_meta.json
289 B
install.sh
788 B
notion-cli.js
17.5 KB
package.json
795 B
README.md
9.6 KB
setup-wizard.sh
7.9 KB
skill.json
709 B
SKILL.md
13.2 KB
SUPPORT.md
1.6 KB
tsconfig.json
642 B
SKILL.md

name: notion version: 0.1.0 description: Integrate with Notion workspaces to read pages, query databases, create entries, and manage content. Perfect for knowledge bases, project tracking, content calendars, CRMs, and collaborative documentation. Works with any Notion page or database you explicitly share with the integration.

Notion Integration

Connect your Notion workspace to OpenClaw for seamless knowledge management and project tracking.

When to Use This Skill

Use Notion when the user wants to:

  • Add items to a database (backlog, todos, tracking)
  • Create new pages in a database or as children of existing pages
  • Query/search their Notion workspace for information
  • Update existing pages (status, notes, properties)
  • Read page content or database entries

Setup

1. Create Notion Integration

  1. Go to notion.so/my-integrations
  2. Click New integration
  3. Name it (e.g., "OpenClaw")
  4. Select your workspace
  5. Copy the Internal Integration Token (starts with secret_)
  6. Save this token securely in OpenClaw config or environment: NOTION_TOKEN=secret_...

2. Share Pages with Integration

Important: Notion integrations have NO access by default. You must explicitly share:

  1. Go to any page or database in Notion
  2. Click ShareAdd connections
  3. Select your "OpenClaw" integration
  4. The skill can now read/write to that specific page/database

3. Get Database/Page IDs

From URL:

  • Database: https://www.notion.so/workspace/XXXXXXXX?v=... → ID is XXXXXXXX (32 chars)
  • Page: https://www.notion.so/workspace/XXXXXXXX → ID is XXXXXXXX

Note: Remove hyphens when using IDs. Use the 32-character string.

Core Operations

Query Database

Retrieve entries from any database you've shared.

// Using the Notion skill via exec
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js query-database ${databaseId}`
});

// With filters (example: status = "In Progress")
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js query-database ${databaseId} --filter '{"property":"Status","select":{"equals":"In Progress"}}'`
});

Returns: Array of pages with properties as configured in your database.

Add Database Entry

Create a new row in a database.

// Add entry with multiple properties
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js add-entry ${databaseId} \
    --title "My New Content Idea" \
    --properties '${JSON.stringify({
      "Status": { "select": { "name": "Idea" } },
      "Platform": { "multi_select": [{ "name": "X/Twitter" }] },
      "Tags": { "multi_select": [{ "name": "3D Printing" }, { "name": "AI" }] },
      "Priority": { "select": { "name": "High" } }
    })}'`
});

Get Page Content

Read the content of any page (including database entries).

await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js get-page ${pageId}`
});

Returns: Page title, properties, and block content (text, headings, lists, etc.).

Update Page

Modify properties or append content to an existing page.

// Update properties
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js update-page ${pageId} \
    --properties '${JSON.stringify({
      "Status": { "select": { "name": "In Progress" } }
    })}'`
});

// Append content blocks
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js append-body ${pageId} \
    --text "Research Notes" --type h2`
});

Search Notion

Find pages across your shared workspace.

await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js search "content ideas"`
});

Common Use Cases

Content Pipeline (Content Creator Workflow)

Database Structure:

  • Title (title)
  • Status (select: Idea → Draft → Scheduled → Posted)
  • Platform (multi_select: X/Twitter, YouTube, MakerWorld, Blog)
  • Publish Date (date)
  • Tags (multi_select)
  • Draft Content (rich_text)

OpenClaw Integration:

// Research scout adds findings to Notion
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js add-entry ${contentDbId} \
    --title "New 3D Print Technique" \
    --properties '${JSON.stringify({
      "Status": { "select": { "name": "Idea" } },
      "Platform": { "multi_select": [{ "name": "YouTube" }] },
      "Tags": { "multi_select": [{ "name": "3D Printing" }] }
    })}'`
});

// Later: Update when drafting
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js update-page ${entryId} \
    --properties '${JSON.stringify({
      "Status": { "select": { "name": "Draft" } },
      "Draft Content": { "rich_text": [{ "text": { "content": "Draft text here..." } }] }
    })}'`
});

Project Management (Solo Entrepreneur)

Database Structure:

  • Name (title)
  • Status (select: Not Started → In Progress → Blocked → Done)
  • Priority (select: Low → Medium → High → Critical)
  • Due Date (date)
  • Estimated Hours (number)
  • Actual Hours (number)
  • Links (url)
  • Notes (rich_text)

Weekly Review Integration:

// Query all "In Progress" projects
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js query-database ${projectsDbId} --filter '{"property":"Status","select":{"equals":"In Progress"}}'`
});

Customer/Quote CRM (3D Printing Business)

Database Structure:

  • Customer Name (title)
  • Status (select: Lead → Quote Sent → Ordered → Printing → Shipped)
  • Email (email)
  • Quote Value (number)
  • Filament Type (select)
  • Due Date (date)
  • Shopify Order ID (rich_text)

Shopify Integration:

// New order → create CRM entry
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js add-entry ${crmDbId} \
    --title "${customerName}" \
    --properties '${JSON.stringify({
      "Status": { "select": { "name": "Ordered" } },
      "Email": { "email": customerEmail },
      "Shopify Order ID": { "rich_text": [{ "text": { "content": orderId } }] }
    })}'`
});

Knowledge Base (Wiki Replacement for MEMORY.md)

Structure: Hub page with nested pages:

  • 🏠 Home (shared with integration)
    • SOPs
    • Troubleshooting
    • Design Patterns
    • Resource Links

Query for quick reference:

// Search for "stringing" to find 3D print troubleshooting
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js search "stringing"`
});

Property Types Reference

When creating/updating database entries, use these property value formats:

// Title (always required for new pages)
{ "title": [{ "text": { "content": "Page Title" } }] }

// Select (single choice)
{ "select": { "name": "Option Name" } }

// Multi-select (multiple choices)
{ "multi_select": [{ "name": "Tag 1" }, { "name": "Tag 2" }] }

// Status (for new Status property type)
{ "status": { "name": "In progress" } }

// Text / Rich text
{ "rich_text": [{ "text": { "content": "Your text here" } }] }

// Number
{ "number": 42 }

// Date
{ "date": { "start": "2026-02-15" } }
{ "date": { "start": "2026-02-15T10:00:00", "end": "2026-02-15T12:00:00" } }

// Checkbox
{ "checkbox": true }

// Email
{ "email": "user@example.com" }

// URL
{ "url": "https://example.com" }

// Phone
{ "phone_number": "+1-555-123-4567" }

// Relation (link to another database entry)
{ "relation": [{ "id": "related-page-id-32chars" }] }

Security & Permissions

Critical Security Model:

  • ✅ Integration ONLY sees pages you explicitly share
  • ✅ You control access per page/database
  • ✅ Token stored securely in ~/.openclaw/.env (never in code)
  • ❌ Never commit NOTION_TOKEN to git
  • ❌ Integration cannot access private teamspaces or other users' private pages

Best Practices:

  1. Use a dedicated integration (don't reuse personal integrations)
  2. Share minimum necessary pages (granular > broad)
  3. Rotate token if compromised via Notion integration settings
  4. Review shared connections periodically

Environment Setup

Add to ~/.openclaw/.env:

NOTION_TOKEN=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Or set per-command:

NOTION_TOKEN=secret_xxx node notion-cli.js ...

Error Handling

Common errors and fixes:

ErrorCauseFix
"API token is invalid"Wrong token or integration deletedCheck token at notion.so/my-integrations
"object_not_found"Page not shared with integrationShare page: Share → Add connections
"validation_error"Property format incorrectCheck property type in database
"rate_limited"Too many requestsAdd delay between requests

Quick Install (One Command)

cd ~/.agents/skills/notion
./install.sh

Manual install (if above fails):

cd ~/.agents/skills/notion
npm install

That's it! No build step required for the standalone version.

Quick Test

# After setting NOTION_TOKEN in ~/.openclaw/.env
node notion-cli.js test

Reference entries by Notion auto-ID (e.g., #3) or direct UUID.

By Notion ID (Recommended for Manual Use)

Use the number you see in your database's ID column:

# Get entry #3
node notion-cli.js get-page '#3' DATABASE_ID

# Add content to entry #3
node notion-cli.js append-body '#3' --database DATABASE_ID \
  --text "Research notes" --type h2

# Add bullet to entry #3
node notion-cli.js append-body '#3' --database DATABASE_ID \
  --text "Key finding" --type bullet

By Direct UUID (For Automation)

# Using full UUID from Notion URL
node notion-cli.js get-page 2fb3e4ac...
node notion-cli.js append-body 2fb3e4ac... \
  --text "Content" --type paragraph

Auto-detection: Starts with # = Notion ID lookup. 32-char hex = Direct UUID.

Pro Tip: Add an ID property (type: unique ID) to auto-number entries as #1, #2, #3...

Page Body Editing

Add rich content to page bodies, not just properties.

Append Content Blocks

# Add heading
node notion-cli.js append-body PAGE_ID --text "Research Summary" --type h2

# Add paragraph (default)
node notion-cli.js append-body PAGE_ID --text "Detailed findings go here..."

# Add bullet list item
node notion-cli.js append-body PAGE_ID --text "First key finding" --type bullet

# Add numbered list item
node notion-cli.js append-body PAGE_ID --text "Step one description" --type numbered

# Add TODO checkbox
node notion-cli.js append-body PAGE_ID --text "Create video script" --type todo

# Add quote
node notion-cli.js append-body PAGE_ID --text "Important quote from source" --type quote

# Add code block
node notion-cli.js append-body PAGE_ID --text "const result = optimizeSupports();" --type code --lang javascript

Supported Block Types

TypeDescriptionExample Use
paragraphRegular text (default)Descriptions, explanations
h1, h2, h3HeadingsSection organization
bulletBulleted listKey findings, features
numberedNumbered listStep-by-step instructions
todoCheckbox itemAction items, tasks
quoteBlockquoteSource citations
codeCode blockSnippets, commands
dividerHorizontal lineSection separation

Get Page with Body Content

# Get full page including formatted body
node notion-cli.js get-page PAGE_ID

Returns:

  • Page properties
  • Formatted body blocks (type + content preview)
  • Block count

Advanced: Raw JSON Blocks

For complex layouts, use raw Notion block JSON:

node notion-cli.js append-body PAGE_ID --blocks '[
  {"object":"block","type":"heading_2","heading_2":{"rich_text":[{"text":{"content":"Research Notes"}}]}},
  {"object":"block","type":"bulleted_list_item","bulleted_list_item":{"rich_text":[{"text":{"content":"Finding 1"}}]}},
  {"object":"block","type":"code","code":{"rich_text":[{"text":{"content":"console.log(1)"}}],"language":"javascript"}}
]'

Advanced: Webhook Sync

For bidirectional sync (Notion changes → OpenClaw):

  1. Set up Notion webhook integration (requires Notion partner account)
  2. Configure webhook endpoint to your OpenClaw Gateway
  3. Skill processes incoming webhooks and updates memory files

See references/webhooks.md for implementation details.


Need help? Check your Notion integration settings at https://www.notion.so/my-integrations

Using in OpenClaw

Quick Setup

# 1. Install
cd ~/.agents/skills/notion
npm install

# 2. Configure token
echo "NOTION_TOKEN=secret_xxxxxxxxxx" >> ~/.openclaw/.env

# 3. Test connection
node notion-cli.js test

From OpenClaw Agent

// Query database
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js query-database YOUR_DB_ID`
});

// Add entry
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js add-entry YOUR_DB_ID \\
    --title "New Content Idea" \\
    --properties '{"Status":{"select":{"name":"Idea"}}}'`
});

// Search
await exec({
  command: `node ~/.agents/skills/notion/notion-cli.js search "tree support"`
});

Cron Job Usage

Update your Research Topic Scout to push to Notion:

"message": "Research trends and add to Notion: 
  node ~/.agents/skills/notion/notion-cli.js add-entry DB_ID 
    --title '<title>' 
    --properties '{...,\"Platform\":{\"multi_select\":[{\"name\":\"X\"}]}}'"
README.md
<div align="center">

🔗 OpenClaw Notion Skill

Seamlessly integrate your Notion workspace with OpenClaw agents

License: MIT OpenClaw Notion Support Project

</div>

Transform your Notion workspace into a living knowledge base that your AI agents can read, write, and manage. Perfect for content pipelines, project tracking, CRMs, and collaborative documentation.


✨ What It Does

FeatureDescription
📊 Query DatabasesPull structured data from any Notion database
📝 Create EntriesAdd new rows from agent research and discoveries
🔍 Search WorkspaceFind pages across your entire shared workspace
🔄 Update ContentModify properties and append blocks dynamically
🗂️ View SchemasInspect database structures programmatically
🔢 Smart ID ReferenceUse Notion ID #3 or direct UUID — your choice

Perfect for:

  • Content creators managing editorial calendars
  • Solo entrepreneurs tracking projects and leads
  • Teams building knowledge bases
  • Researchers compiling findings
  • Anyone who wants their AI to actually use Notion

🚀 Quick Start (5 Minutes)

Install via Clawhub (Coming Soon)

Once published:

openclaw skills install notion-enhanced

Manual Install

1. Create Notion Integration

notion.so/my-integrations → New integration → Copy token

The token starts with secret_. Keep it safe.

2. Install the Skill

git clone https://github.com/MoikasLabs/openclaw-notion-skill.git
cd openclaw-notion-skill
./install.sh

3. Configure

# Add to ~/.openclaw/.env
NOTION_TOKEN=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

4. Share Your Database

In Notion:

  1. Open your database/page
  2. Click ShareAdd connections
  3. Select your integration name

5. Test Connection

node notion-cli.js test

You'll see all accessible pages and databases. ✅


🎯 Usage Examples

Command Line

# List all entries in your Content Ideas database
node notion-cli.js query-database abc123def456...

# Filter by status
node notion-cli.js query-database abc123... \
  --filter '{"property":"Status","select":{"equals":"Idea"}}'

# Add a new research finding
node notion-cli.js add-entry abc123... \
  --title "AI-Generated Support Structures in 3D Printing" \
  --properties '{"Status":{"select":{"name":"Idea"}},"Platform":{"multi_select":[{"name":"YouTube"}]}}'

# Search across workspace
node notion-cli.js search "tree support"

# Mark as drafted
node notion-cli.js update-page page-id-123... \
  --properties '{"Status":{"select":{"name":"Draft"}}}'

Smart ID Resolution (Notion ID or UUID)

Reference entries by Notion ID (what you see in the ID column):

# Get page by Notion ID #3 - auto-resolves to actual page ID
node notion-cli.js get-page '#3' DATABASE_ID

# Append content using Notion ID
node notion-cli.js append-body '#3' \
  --database DATABASE_ID \
  --text "Research notes here" \
  --type h2

# Add a link to entry #3
node notion-cli.js append-body '#3' \
  --database DATABASE_ID \
  --text "Example: https://makerworld.com/models/123" \
  --type bullet

Or use direct UUID for automation:

# Direct UUID (copy from URL)
node notion-cli.js append-body 2fb3e4ac... \
  --text "Content here" \
  --type paragraph

The CLI auto-detects:

  • Starts with #Notion ID lookup (requires database ID)
  • 32-char hex → Direct UUID (no database needed)

From OpenClaw

// Check your content pipeline
await exec({
  command: `node openclaw-notion-skill/notion-cli.js query-database ${CONTENT_DB_ID}`
});

// Log a discovery
await exec({
  command: `node openclaw-notion-skill/notion-cli.js add-entry ${PROJECTS_DB_ID} \\
    --title "${discoveryTitle}" \\
    --properties '{"Priority":{"select":{"name":"High"}}}'`
});

In Cron Jobs

// Research Topic Scout → Pushes directly to Notion
"Research 3D printing trends and add ideas to Notion database"

📁 Database Templates

Content Pipeline

PropertyTypeValues
TitleTitle-
StatusSelectIdea → Draft → Scheduled → Posted
PlatformMulti-selectX/Twitter, YouTube, MakerWorld, Blog
Publish DateDate-
TagsMulti-select3D Printing, AI, Entrepreneurship
Draft ContentRich Text-

Project Tracker

PropertyTypeValues
NameTitle-
StatusSelectNot Started → In Progress → Blocked → Done
PrioritySelectLow → Medium → High → Critical
Due DateDate-
Est. HoursNumber-
LinksURLGitHub, MakerWorld, etc.

CRM (3D Printing Business)

PropertyTypeValues
CustomerTitle-
StatusSelectLead → Quote → Ordered → Printing → Shipped
EmailEmail-
Quote ValueNumber$
FilamentSelectPLA, PETG, ABS, etc.

🔐 Security

  • Token isolation: Stored in ~/.openclaw/.env — never in code
  • Granular permissions: Integration only sees pages you explicitly share
  • No blanket access: Cannot touch private pages or unshared teamspaces
  • Your control: Revoke anytime via notion.so/my-integrations
# Check what's shared
node notion-cli.js test

🛠️ Advanced Usage

Property Types Reference

// Select (single choice)
{ "select": { "name": "In Progress" } }

// Multi-select
{ "multi_select": [{ "name": "Tag 1" }, { "name": "Tag 2" }] }

// Status (new type)
{ "status": { "name": "In progress" } }

// Rich text
{ "rich_text": [{ "text": { "content": "Notes here" } }] }

// Date
{ "date": { "start": "2026-02-15" } }

// Number
{ "number": 42 }

// Checkbox
{ "checkbox": true }

Error Handling

ErrorFix
API token is invalidCheck token at notion.so/my-integrations
object_not_foundShare the page with your integration
validation_errorCheck property type matches database schema
rate_limitedAdd 350ms delay between requests

🧰 Installation Options

git clone https://github.com/MoikasLabs/openclaw-notion-skill.git
cd openclaw-notion-skill
npm install

Uses notion-cli.js — no build step.

Option B: Full (TypeScript)

git clone https://github.com/MoikasLabs/openclaw-notion-skill.git
cd openclaw-notion-skill
npm install
npm run build

Uses compiled dist/cli.js with full TypeScript support.


📝 CLI Reference

notion-cli.js <command> [options]

Commands:
  test                          Test connection, list accessible pages
  query-database <id>           Query database entries
  add-entry <id>                Add new database row
  get-page <id>                 Get page content
  update-page <id>              Update page properties
  get-database <id>             Show database schema
  search <query>                Search workspace

Options:
  --filter '<json>'             Filter query results
  --title "text"                Set entry title
  --properties '<json>'         Set additional properties
  --help                        Show help

Database ID Format:
  From URL: notion.so/workspace/ABC123...
  Use: ABC123... (32 chars, no hyphens)

🌟 Why This Exists

Most AI "integrations" just read a static export. This skill lets your agents:

  • ✅ Write findings back to your knowledge base
  • ✅ Update project status as work progresses
  • ✅ Query structured data for context
  • ✅ Build living documentation

Real use case:

Your nightly Research Topic Scout cron job searches 3D printing trends, finds 5 interesting techniques, and automatically adds them to your Content Ideas database with status "Idea" and tags extracted from the source.


🤝 Contributing

  1. Fork the repo
  2. Create a branch: git checkout -b feature/amazing-thing
  3. Commit changes: git commit -m 'Add amazing thing'
  4. Push: git push origin feature/amazing-thing
  5. Open a Pull Request

Ideas welcome: webhooks, bidirectional sync, bulk operations, templates.


📜 License

MIT — Built with ❤️ by the OpenClaw community at MoikasLabs


🔗 Links


<div align="center">

Built for agents who actually get work done. 🐉

</div>

📦 Quick Start Templates

Don't build from scratch. Use our pre-configured templates:

TemplateBest ForFile
📝 Content PipelineWriters, YouTubers, social mediatemplates/content-pipeline.json
🎯 Project TrackerFreelancers, solo entrepreneurstemplates/project-tracker.json
🖨️ 3D Print CRMMakers, print shopstemplates/crm-3d-printing.json
📚 Knowledge BaseSOPs, documentation, wikistemplates/knowledge-base.json

See templates/README.md for detailed setup instructions and automation examples.


<div align="center">

Built for agents who actually get work done. 🐉

</div>

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

**Critical Security Model:** - ✅ Integration ONLY sees pages you explicitly share - ✅ You control access per page/database - ✅ Token stored securely in `~/.openclaw/.env` (never in code) - ❌ Never commit `NOTION_TOKEN` to git - ❌ Integration cannot access private teamspaces or other users' private pages **Best Practices:** 1. Use a dedicated integration (don't reuse personal integrations) 2. Share minimum necessary pages (granular > broad) 3. Rotate token if compromised via Notion integration settings 4. Review shared connections periodically

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install notion?

Run openclaw add @moikapy/openclaw-notion-skill in your terminal. This installs notion into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/moikapy/openclaw-notion-skill. Review commits and README documentation before installing.