Handles Notion workspace operations: page creation, database queries, content updates, and workspace search. Activates when the user wants to create, search, query, update, or browse anything in Notion — even casual 'find that page in Notion' or 'add this to my database.' Covers CLI tool usage, workspace discovery, and batch operations.
Interact with Notion workspaces through notion-tool.mjs, a CLI wrapper around the official @notionhq/client SDK. This skill provides the operational knowledge for translating natural language requests into Notion API calls via CLI commands, covering page creation, database operations, content updates, and workspace search.
Referenced by all four commands: /founder-os:notion:create, /founder-os:notion:query, /founder-os:notion:update, /founder-os:notion:template.
The Notion CLI tool (notion-tool.mjs) exposes these commands. Use them as the sole interface to Notion — never construct raw API calls.
| Command | Purpose | Key Args |
|---|---|---|
search <query> | Find pages and databases by title | --filter page|database |
query <database-id> | Query database with filters/sorts | --filter json, , |
--sorts json--page-size Ncreate-page <parent-id> | Create page/row in database | --properties json, --content json |
update-page <page-id> | Update page properties | --properties json |
get-page <page-id-or-url> | Read page properties | — |
get-blocks <page-id> | Read page content/body | --recursive |
get-comments <page-id> | Read discussion threads | — |
create-comment <page-id> | Add comment to page | --body text |
create-database <parent-id> | Create a new database | --title text, --properties json |
update-database <database-id> | Update database properties/schema | --properties json |
fetch <notion-url> | Resolve any Notion URL | — |
All commands are invoked via Bash:
node ../../../../.founderOS/scripts/notion-tool.mjs <command> [args]
All output is JSON to stdout. Errors are structured JSON to stderr with exit code 1.
Before performing operations, understand the workspace structure. This is critical when the user references pages by name rather than URL.
Discovery pipeline:
search with the page/database name the user provides.get-page to read page properties, or get-blocks for content.Disambiguation rules:
Translate the user's natural language description into a page creation call.
Creation pipeline:
--parent=NAME is provided, search for and resolve the parent page. If omitted, create at workspace root.paragraph blocksbulleted_list_item blocksnumbered_list_item blocksheading_1, heading_2, heading_3 blockscode blocksto_do blockscreate-page with the parent ID, --properties for title, and --content for content blocks.Fetch and present page content in a readable format.
get-page with the page URL or ID.Title property.Map natural language change descriptions to property updates or content modifications.
Update pipeline:
update-page CLI parameters.Property value mapping:
Consult skills/notion/notion-operations/references/workspace-patterns.md for the full property value mapping table and advanced update patterns.
Database creation is handled jointly with the notion-database-design skill (see skills/notion/notion-database-design/SKILL.md). This skill provides the operational execution; the design skill provides schema translation.
create-database with parent ID, --title, and --properties for property definitions.Translate natural language questions into database queries with filters and sorts.
Query pipeline:
search, or accept --db=NAME flag.query <database-id> --page-size 1 to discover properties, or get-page <database-id> for the schema.Due Date before today AND Status is not "Done"Priority equals "High"Assignee contains current userCreated after Monday of current weekquery <database-id> --filter '<json>' --sorts '<json>'.Result card format:
### [Title]
- Status: [value]
- Priority: [value]
- Due: [date]
- [other relevant properties]
→ [Notion URL]
Limit results to --limit=N (default 10). If more results exist, note the total count.
Consult skills/notion/notion-operations/references/workspace-patterns.md for NL-to-filter translation examples and complex filter patterns.
Notion search has specific behaviors that affect how queries should be constructed.
Key behaviors:
AND, OR, NOT) are not supported — use simple keyword phrases.Search approach by intent:
| User intent | Strategy |
|---|---|
| Find a specific page | Search by exact title keywords |
| Browse a topic | Search by topic keyword, scan results |
| Query database records | First find the database, then query with filters |
| Explore workspace | Search with broad terms, present top results as an overview |
Empty result handling:
When creating or appending content, convert user text to appropriate Notion block types.
Detection rules:
- or * → bulleted_list_item1. , 2. → numbered_list_item[ ] or [x] → to_do# → heading_1, ## → heading_2, ### → heading_3code> → quote---) → dividerparagraphPreserve inline formatting: bold, italic, code, strikethrough, links.
$NOTION_API_KEY is set. Run /founder-os:setup:notion-cli for setup. Do not attempt any Notion operations.For detailed patterns and advanced techniques, consult:
skills/notion/notion-operations/references/workspace-patterns.md — NL-to-filter translation examples, property value mapping tables, complex query patterns, and multi-block content construction examples