notion

Solid

Search, read, create and update pages and databases in your Notion workspace via the Notion API. Use when the user asks to find, read, or write Notion pages, notes, docs, or database rows.

AI & Automation 22 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Notion (connected) Token in `$NOTION_TOKEN`. Base is `https://api.notion.com/v1`, and every call carries three headers, so define this helper once per shell — `notion <METHOD> <path> [-d '<json>']`: ```sh notion() { local m="$1" p="$2"; shift 2; curl -s -X "$m" -H "Authorization: Bearer $NOTION_TOKEN" \ -H "Notion-Version: 2022-06-28" -H "Content-Type: application/json" \ "https://api.notion.com/v1/$p" "$@"; } ``` The integration only sees pages and databases someone shared with it (page `•••` → `Connections`); sub-pages inherit. **A 404 (`object_not_found`) therefore usually means "not shared", not "does not exist"** — report it that way and ask the user to share the page rather than concluding it is gone. - Who am I: `notion GET users/me | jq '{name, workspace: .bot.workspace_name}'` - Search — titles only, across everything shared: `notion POST search -d '{"query":"<QUERY>","page_size":20}' | jq -c '.results[] | {id, object, url}'` (add `"filter":{"property":"object","value":"page"}` — or `"value":"database"` — to narrow; an empty query lists everything shared) - A page's title: `notion GET pages/<PAGE_ID> | jq -r '[.properties[] | select(.type=="title") | .title[].plain_text] | join("")'` - Read a page's content: `notion GET "blocks/<PAGE_ID>/children?page_size=100" | jq -c '.results[] | {id, type, has_children, text: ([.[.type].rich_text[]?.plain_text] | join(""))}'` — a block with `has_children: true` (toggle, sub-page, column) needs its own `blocks/<BLOCK_ID>...

Details

Author
intentic
Repository
intentic/intentic
Created
2 weeks ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category