Notion Integration
Manage Notion workspaces via API for automation and integration.
Quick Start
# Install Notion client
pip install notion-client
# Set API key
export NOTION_TOKEN="secret_xxx"
Core Features
- Database Operations: Create, query, update databases
- Page Management: Create, read, update, delete pages
- Block Operations: Add/update content blocks
- User Info: Get workspace user information
Script Usage
# Query a database
python scripts/notion.py query --database-id <id>
# Create a page
python scripts/notion.py create-page --database-id <id> --title "Task Name"
# Get page content
python scripts/notion.py get-page --page-id <id>
Setup
- Create integration at https://www.notion.so/my-integrations
- Share database/page with integration
- Set NOTION_TOKEN environment variable
Examples
See references/examples.md for detailed use cases.
