Manage Notion workspaces via API for automation and integration.
# Install Notion client
pip install notion-client
# Set API key
export NOTION_TOKEN="secret_xxx"
# 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>
See references/examples.md for detailed use cases.
共 1 个版本