← ClaudeAtlas

notionsolid

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.
intentic/intentic · ★ 46 · AI & Automation · score 82
Install: claude install-skill intentic/intentic
# 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>/child