Skip to content
Back to skills

Notion

CSecurity

Notion workspace — read/write pages, databases, search, create tasks via Notion API

  • 53 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 13, 2026
ai-agentspythongobashdockerapidatabase

Works with

  • cli
  • api

Security analysis

C71/100
  • mediumUses curl or wget to download content
  • criticalAccesses sensitive system or user directories
  • criticalDownloads and executes remote scripts — classic supply chain attack

Pro shows the line behind each finding and how to fix it

Scanned September 13, 2026

npx -y skills add ariffazil/arifOS --skill notion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Notion?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Notion
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/ariffazil-notion/badge)](https://www.skillsdirectory.com/skills/ariffazil-notion)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: notion
description: Notion workspace — read/write pages, databases, search, create tasks via Notion API
user-invocable: true
---

# Notion Skill — arifOS_bot

Triggers: "notion", "note", "add to notion", "search notion", "create page",
          "update notion", "notion database", "my notes", "add task to notion",
          "notion doc", "write to notion"

API: `https://api.notion.com/v1` | Auth: `NOTION_API_KEY` (Integration Token)

---

## ⚙️ One-Time Setup (do once, then forget)

**Status: NOTION_API_KEY not yet configured.**

1. Go to: https://www.notion.so/my-integrations
2. Click **"New integration"** → name it `arifOS_bot`
3. Select your workspace → Submit → Copy the **Internal Integration Token** (`secret_...`)
4. Add the token to VPS:
   ```bash
   # On VPS host:
   echo 'NOTION_API_KEY=secret_YOUR_TOKEN_HERE' >> /root/arifOS/.env
   docker compose up -d --force-recreate openclaw
   ```
5. **Share pages with the integration**: Open any Notion page → **Share** → invite `arifOS_bot`

After setup, test:
```bash
curl -s https://api.notion.com/v1/users/me \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" | python3 -m json.tool
```

---

## Search

```bash
# Search across your Notion workspace
curl -s -X POST https://api.notion.com/v1/search \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"query":"YOUR SEARCH TERM","page_size":10}' \
  | python3 -c "
import sys, json
d = json.load(sys.stdin)
for r in d.get('results',[]):
    title = ''
    if r['object'] == 'page':
        props = r.get('properties',{})
        for k,v in props.items():
            if v.get('type') == 'title':
                title = ''.join([t['plain_text'] for t in v['title']])
                break
    elif r['object'] == 'database':
        title = ''.join([t['plain_text'] for t in r.get('title',[])])
    print(f\"{r['object']}: {title} — {r['id']}\")
"
```

---

## Read a Page

```bash
PAGE_ID="YOUR-PAGE-ID-HERE"  # from URL: notion.so/PAGE_ID

# Get page metadata
curl -s https://api.notion.com/v1/pages/${PAGE_ID} \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" | python3 -m json.tool

# Get page content (blocks)
curl -s https://api.notion.com/v1/blocks/${PAGE_ID}/children \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  | python3 -c "
import sys, json
d = json.load(sys.stdin)
for block in d.get('results', []):
    bt = block['type']
    content = block.get(bt, {})
    text = ''.join([t.get('plain_text','') for t in content.get('rich_text',[])])
    if text: print(f'[{bt}] {text}')
"
```

---

## Create a Page

```bash
PARENT_PAGE_ID="YOUR-PARENT-PAGE-ID"

curl -s -X POST https://api.notion.com/v1/pages \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d "{
    \"parent\": {\"page_id\": \"${PARENT_PAGE_ID}\"},
    \"properties\": {
      \"title\": {\"title\": [{\"text\": {\"content\": \"YOUR TITLE HERE\"}}]}
    },
    \"children\": [
      {
        \"object\": \"block\",
        \"type\": \"paragraph\",
        \"paragraph\": {
          \"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"Page content here.\"}}]
        }
      }
    ]
  }" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Created:', d.get('id'), d.get('url'))"
```

---

## Append to Existing Page

```bash
PAGE_ID="YOUR-PAGE-ID"
CONTENT="New content to append"

curl -s -X PATCH "https://api.notion.com/v1/blocks/${PAGE_ID}/children" \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d "{
    \"children\": [
      {
        \"object\": \"block\",
        \"type\": \"paragraph\",
        \"paragraph\": {
          \"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"${CONTENT}\"}}]
        }
      }
    ]
  }" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Appended:', len(d.get('results',[])),'blocks')"
```

---

## Database — Query & Add Rows

```bash
DB_ID="YOUR-DATABASE-ID"

# Query database rows
curl -s -X POST "https://api.notion.com/v1/databases/${DB_ID}/query" \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"page_size": 20}' \
  | python3 -c "
import sys, json
d = json.load(sys.stdin)
print(f'Total rows: {len(d[\"results\"])}')
for row in d['results'][:5]:
    props = row['properties']
    for k, v in props.items():
        if v.get('type') == 'title':
            title = ''.join([t['plain_text'] for t in v['title']])
            print(f'  - {title}')
"

# Add a row to database (adjust property names to match your DB schema)
curl -s -X POST https://api.notion.com/v1/pages \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d "{
    \"parent\": {\"database_id\": \"${DB_ID}\"},
    \"properties\": {
      \"Name\": {\"title\": [{\"text\": {\"content\": \"New Task\"}}]},
      \"Status\": {\"select\": {\"name\": \"Todo\"}}
    }
  }" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Row created:', d.get('id'))"
```

---

## Quick Shortcuts

```bash
# List all databases you have access to
curl -s -X POST https://api.notion.com/v1/search \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"filter":{"value":"database","property":"object"}}' \
  | python3 -c "
import sys, json
d = json.load(sys.stdin)
for db in d['results']:
    title = ''.join([t['plain_text'] for t in db.get('title',[])])
    print(f'{title}: {db[\"id\"]}')
"
```

---

## arifOS_bot → Notion Pipeline

When Arif says "log this to Notion" or "save this decision to Notion":
1. Search for the target page/database by name
2. Append content with timestamp and source tag
3. Log to `~/.openclaw/workspace/logs/audit.jsonl`

*arifOS_bot — Notion API v2022-06-28*

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.