notion-core-workflow-a

Featured

Query, filter, and manage Notion databases and pages. Use when building database queries with filters and sorts, creating/updating pages with typed properties, or reading page content. Trigger with phrases like "notion database query", "notion filter", "notion create page", "notion update properties", "notion CRUD".

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 Core Workflow A — Databases & Pages ## Overview Primary workflow for Notion integrations: querying databases with filters/sorts, creating pages with typed properties, updating page properties, and retrieving page content. ## Prerequisites - Completed `notion-install-auth` setup - A Notion database shared with your integration - Understanding of your database's property schema ## Instructions ### Step 1: Retrieve Database Schema ```typescript import { Client } from '@notionhq/client'; const notion = new Client({ auth: process.env.NOTION_TOKEN }); async function getDatabaseSchema(databaseId: string) { const db = await notion.databases.retrieve({ database_id: databaseId }); // db.properties contains the schema for (const [name, prop] of Object.entries(db.properties)) { console.log(`${name}: ${prop.type}`); // For select/multi_select, show options: if (prop.type === 'select') { console.log(' Options:', prop.select.options.map(o => o.name)); } } return db.properties; } ``` ### Step 2: Query with Filters Notion filters use a unique nested structure based on property type: ```typescript async function queryWithFilters(databaseId: string) { const response = await notion.databases.query({ database_id: databaseId, filter: { and: [ { property: 'Status', select: { equals: 'In Progress' }, }, { property: 'Priority', select: { does_not_equal: 'Low' }, },...

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