Notion
The robomotion notion CLI connects to Notion for page and database management. It creates and updates pages with rich content blocks, queries databases with filters and sorts, and searches across the workspace.
When to use
- Create, read, or update Notion pages with content blocks
- Query and filter Notion databases
- Search pages and databases across the workspace
Prerequisites
robomotionCLI installed- Package installed:
robomotion install notion - Notion integration token configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install notion - Connect with session:
robomotion notion connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion notion search --client-id "<client-id>" --query <text> --session-id "<session-id>" --output json - Disconnect when done:
robomotion notion disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion notion notion_connect --session --output jsonConnects to Notion API and returns a client ID for subsequent operationsrobomotion notion notion_disconnect --client-id --session-id "<session-id>" --output jsonCloses the Notion connection and releases resourcesrobomotion notion notion_create_page --client-id --parent-id --title --content [--icon-emoji] [--parent-type] --session-id "<session-id>" --output jsonCreates a new page in Notion under a parent page or databaserobomotion notion notion_get_page --client-id --page-id --session-id "<session-id>" --output jsonRetrieves a page from Notion by its IDrobomotion notion notion_update_page --client-id --page-id --new-title --properties --icon-emoji --session-id "<session-id>" --output jsonUpdates a page's properties in Notionrobomotion notion notion_archive_page --client-id --page-id --session-id "<session-id>" --output jsonArchives (soft deletes) a page in Notion. Can also restore archived pages.robomotion notion notion_get_database --client-id --database-id --session-id "<session-id>" --output jsonRetrieves a database schema from Notion by its IDrobomotion notion notion_query_database --client-id --database-id --filter --sorts [--100] [--start-cursor] --session-id "<session-id>" --output jsonQueries a Notion database with optional filters and sortingrobomotion notion notion_append_blocks --client-id --parent-block/page-id --content --session-id "<session-id>" --output jsonAppends content blocks to a page or existing block in Notionrobomotion notion notion_get_block_children --client-id --block/page-id [--100] [--start-cursor] --session-id "<session-id>" --output jsonRetrieves child blocks of a page or block in Notionrobomotion notion notion_search --client-id --query [--search-type] [--sort-direction] [--sort-by] [--100] [--start-cursor] --session-id "<session-id>" --output jsonSearches for pages and databases in Notion by title
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)