notion-hello-world

Featured

Create a minimal working Notion API example. Use when starting a new Notion integration, testing your setup, or learning basic Notion API patterns (search, pages, users). Trigger with phrases like "notion hello world", "notion example", "notion quick start", "simple notion code", "first notion API call".

AI & Automation 2,249 stars 312 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 Hello World ## Overview Three minimal examples covering the Notion API core surfaces: searching for pages, creating a test page in a database, and verifying the created page by retrieving it back. ## Prerequisites - Completed `notion-install-auth` setup - `NOTION_TOKEN` environment variable set (internal integration token from https://www.notion.so/my-integrations) - At least one database shared with your integration via the Connections menu - Node.js 18+ with `@notionhq/client` or Python 3.8+ with `notion-client` ## Instructions ### Step 1: Search for Pages in Your Workspace ```typescript import { Client } from '@notionhq/client'; const notion = new Client({ auth: process.env.NOTION_TOKEN }); async function searchPages(query: string) { const { results } = await notion.search({ query, filter: { property: 'object', value: 'page' }, sort: { direction: 'descending', timestamp: 'last_edited_time' }, page_size: 5, }); for (const page of results) { if (page.object === 'page' && 'properties' in page) { // Title lives under a property with type "title" const titleProp = Object.values(page.properties).find( (p) => p.type === 'title' ); const title = titleProp?.type === 'title' ? titleProp.title.map((t) => t.plain_text).join('') : '(untitled)'; console.log(`Page: ${title} (${page.id})`); } } return results; } // Usage: searchPages('meeting notes'); ``` **What this does:** The `...

Details

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

Integrates with

Related Skills