notion-sdk-patterns

Installation
SKILL.md

Notion SDK Patterns

Overview

Production-ready patterns for the official Notion SDK (@notionhq/client for TypeScript, notion-client for Python) covering client initialization, database queries with filters and sorts, cursor-based pagination, rich text construction, block manipulation, and type-safe error handling using SDK error codes.

Prerequisites

  • Node.js 18+ with @notionhq/client v2.x installed, or Python 3.9+ with notion-client
  • A Notion integration token (NOTION_TOKEN) from notion.so/my-integrations
  • Target databases/pages shared with the integration (Share > Invite > select your integration)
  • TypeScript 5+ with strict mode enabled (for TypeScript patterns)

Instructions

Step 1 — Initialize the Client and Query Databases

Set up the SDK client and execute filtered, sorted database queries.

Related skills
Installs
1
GitHub Stars
2.2K
First Seen
Mar 25, 2026