notion-sdk-patterns

Featured

Apply production-ready @notionhq/client SDK patterns for TypeScript and Python. Use when implementing Notion integrations, building database queries with filters and sorts, handling pagination, constructing rich text blocks, or establishing team coding standards for Notion API usage. Trigger with "notion SDK patterns", "notion best practices", "notion code patterns", "idiomatic notion", "notion typescript", "notion python SDK".

AI & Automation 2,274 stars 319 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

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

Skill Content

# 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](https://www.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. **TypeScript — Client initialization:** ```typescript import { Client } from '@notionhq/client'; const notion = new Client({ auth: process.env.NOTION_TOKEN }); ``` **Database query with filter and sort:** ```typescript const response = await notion.databases.query({ database_id, filter: { property: 'Status', select: { equals: 'Active', }, }, sorts: [ { property: 'Created', direction: 'descending', }, ], }); ``` **Compound filters** combine conditions with `and`/`or`: ```typescript const response = await notion.databases.query({ database_id, filter: ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

supabase-sdk-patterns

Apply production-ready Supabase SDK patterns for TypeScript and Python projects. Use when implementing queries, auth, realtime, storage, or RPC calls with @supabase/supabase-js or supabase-py. Trigger with phrases like "supabase SDK patterns", "supabase query", "supabase typescript", "supabase python", "supabase client setup", "supabase realtime", "supabase auth", "supabase storage".

2,274 Updated today
jeremylongshore
AI & Automation Featured

documenso-sdk-patterns

Apply production-ready Documenso SDK patterns for TypeScript and Python. Use when implementing Documenso integrations, refactoring SDK usage, or establishing team coding standards for Documenso. Trigger with phrases like "documenso SDK patterns", "documenso best practices", "documenso code patterns", "idiomatic documenso".

2,274 Updated today
jeremylongshore
AI & Automation Featured

grammarly-sdk-patterns

Apply production-ready Grammarly SDK patterns for TypeScript and Python. Use when implementing Grammarly integrations, refactoring SDK usage, or establishing team coding standards for Grammarly. Trigger with phrases like "grammarly SDK patterns", "grammarly best practices", "grammarly code patterns", "idiomatic grammarly".

2,274 Updated today
jeremylongshore
AI & Automation Featured

elevenlabs-sdk-patterns

Apply production-ready ElevenLabs SDK patterns for TypeScript and Python. Use when implementing ElevenLabs integrations, refactoring SDK usage, or establishing team coding standards for audio AI applications. Trigger: "elevenlabs SDK patterns", "elevenlabs best practices", "elevenlabs code patterns", "idiomatic elevenlabs", "elevenlabs typescript".

2,274 Updated today
jeremylongshore
AI & Automation Featured

hubspot-sdk-patterns

Apply production-ready @hubspot/api-client SDK patterns for TypeScript. Use when implementing HubSpot integrations, building typed wrappers, or establishing team standards for HubSpot CRM operations. Trigger with phrases like "hubspot SDK patterns", "hubspot best practices", "hubspot typed client", "hubspot api-client wrapper", "idiomatic hubspot".

2,274 Updated today
jeremylongshore