Skip to content
Agentmart
Submit a tool

notion

Query databases, create + update pages, search, and append content blocks in a Notion workspace.

Skill by HaraldeRoessler

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/haralderoessler-notion

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Query databases, create + update pages, search, and append content blocks in a Notion workspace. Use when the user asks to add to their Notion, query a Notion database, create a Notion page, search their workspace, or update a Notion page. Requires NOTION_API_KEY env var (an Internal Integration token) and that the integration has been SHARED with the relevant pages/databases from Notion's UI. Each agent should have its own integration.

Use cases: design, backend, writing, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/notion

What's inside

Skill name
notion
Description
Query databases, create + update pages, search, and append content blocks in a Notion workspace. Use when the user asks to add to their Notion, query a Notion database, create a Notion page, search their workspace, or update a Notion page. Requires NOTION_API_KEY env var (an Internal Integration token) and that the integration has been SHARED with the relevant pages/databases from Notion's UI. Each agent should have its own integration.
License
MIT
Compatibility
Requires python3 with notion-client installed (bundled in image). Works on Linux.
Instructions
182 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Notion Skill

Query + create + update Notion content via the official REST API using the `notion-client` Python SDK.

## Prerequisites

One env var + one Notion-side action per target page:

- `NOTION_API_KEY` — Internal Integration token from https://www.notion.so/my-integrations. Create an integration, copy the "Internal Integration Secret" (starts with `secret_`). Configure it on the agent via portal Settings → Skills → Notion.
- For every database or page the agent should access: open it in Notion → top-right `•••` → "Connections" (or "Add connections") → add your integration. Without this share step the API returns 404 for pages it could otherwise see — Notion's permission model is opt-in per-resource.

## Search the workspace

```bash
python3 - <<'PY'
import os, json
from notion_client import Client
n = Client(auth=os.environ["NOTION_API_KEY"])
res = n.search(query="weekly report", page_size=20)
for r in res["results"]:
    obj = r["object"]  # "page" | "database"
    title = ""
    if obj == "page":
        for prop in r.get("properties", {}).values():
            if prop.get("type") == "title":
                title = "".join(t["plain_text"] for t in prop["title"])
                break
    else:
        title = "".join(t["plain_text"] for t in r.get("title", []))
    print(f"{obj:8} {r['id']}  {title}  ({r.get('url','')})")
PY
```

Search only returns objects shared with your integration.

## Get a page's properties + content

```bash
python3 - <<'PY'
import os, sys, json
from notion_client import Client
PAGE_ID = sys.argv[1]  # can include dashes or not; Notion accepts both
n = Client(auth=os.environ["NOTION_API_KEY"])
page = n.pages.retrieve(page_id=PAGE_ID)
print("Properties:")
for name, prop in page["properties"].items():
    t = prop["type"]
    val = prop[t]
    print(f"  {name:30} [{t}]  {val}")

print("\nContent blocks:")
cursor = None
while True:
    resp = n.blocks.children.list(block_id=PAGE_ID, start_cursor=cursor, page_size=100)
    for b in resp["results"]:
        t = b["type"]
        content = b[t]
        if t in ("paragraph", "heading_1", "heading_2", "heading_3", "bulleted_list_item", "numbered_list_item", "quote"):
            text = "".join(r["plain_text"] for r in content.get("rich_text", []))
            print(f"  [{t}] {text}")
        elif t == "to_do":
            text = "".join(r["plain_text"] for r in content.get("rich_text", []))
            print(f"  [todo {'x' if content.get('checked') else ' '}] {text}")
        elif t == "code":
            text = "".join(r["plain_text"] for r in content.get("rich_text", []))
            print(f"  [code/{content.get('language','')}]\n{text}\n")
        else:
            print(f"  [{t}]  (not rendered — see full block JSON if needed)")
    if not resp.get("has_more"): break
    cursor = resp.get("next_cursor")
PY
```

## Query a database

```bash
python3 - <<'PY'
import os, sys, json
from notion_client import Client
DB_ID = sys.argv[1]
n = Client(auth=os.environ["NOTION_API_KEY"])

# Simple filter: status = "In progress"
resp = n.databases.query(
    database_id=DB_ID,
    filter={"property": "Status", "status": {"equals": "In progress"}},
    sorts=[{"property": "Due date", "direction": "ascending"}],
    page_size=50,
)

for r in resp["results"]:
    props = r["properties"]
    title_prop = next((p for p in props.values() if p.get("type") == "title"), None)
    title = "".join(t["plain_text"] for t in title_prop["title"]) if title_prop else "(untitled)"
    print(f"{r['id']}  {title}")
PY
```

Filter shapes vary per property type — see https://developers.notion.com/reference/post-database-query-filter.

## Create a new page inside a database

```bash
python3 - <<'PY'
import os, sys, json
from notion_client import Client
DB_ID = sys.argv[1]
TITLE = sys.argv[2] if len(sys.argv) > 2 else "Created from ownify agent"
n = Client(auth=os.environ["NOTION_API_KEY"])

page = n.pages.create(
    parent={"database_id": DB_ID},
    properties={
        # Replace "Name" with whatever your database calls its title column
        "Name": {"title": [{"text": {"content": TITLE}}]},
        # Example non-title properties:
        # "Status": {"status": {"name": "Not started"}},
        # "Priority": {"select": {"name": "High"}},
        # "Due date": {"date": {"start": "2026-05-01"}},

From HaraldeRoessler/ownify-microclaw, MIT.

More from HaraldeRoessler/ownify-microclaw

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
May 2, 2026 (5 months ago)
Last release
Jun 7, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from HaraldeRoessler

Cite this page

notion skill. Agent Mart. https://agentmart.dev/skills/haralderoessler-notion (last updated 2026-10-24)