notion-automation
通过Rube MCP(Composio)自动化Notion任务:页面、数据库、块、评论、用户。始终优先搜索工具以获取当前架构。
Notion Automation via Rube MCP
Automate Notion operations through Composio's Notion toolkit via Rube MCP.
Prerequisites
RUBE_MANAGE_CONNECTIONS with toolkit notionRUBE_SEARCH_TOOLS first to get current tool schemasSetup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit notionCore Workflows
1. Create and Manage Pages
When to use: User wants to create, update, or archive Notion pages
Tool sequence:
NOTION_SEARCH_NOTION_PAGE - Find parent page or existing page [Prerequisite]NOTION_CREATE_NOTION_PAGE - Create a new page under a parent [Optional]NOTION_RETRIEVE_PAGE - Get page metadata/properties [Optional]NOTION_UPDATE_PAGE - Update page properties, title, icon, cover [Optional]NOTION_ARCHIVE_NOTION_PAGE - Soft-delete (archive) a page [Optional]Key parameters:
query: Search text for SEARCH_NOTION_PAGEparent_id: Parent page or database IDpage_id: Page ID for retrieval/update/archiveproperties: Page property values matching parent schemaPitfalls:
2. Query and Manage Databases
When to use: User wants to query database rows, insert entries, or update records
Tool sequence:
NOTION_SEARCH_NOTION_PAGE - Find the database by name [Prerequisite]NOTION_FETCH_DATABASE - Inspect schema and properties [Prerequisite]NOTION_QUERY_DATABASE / NOTION_QUERY_DATABASE_WITH_FILTER - Query rows [Required]NOTION_INSERT_ROW_DATABASE - Add new entries [Optional]NOTION_UPDATE_ROW_DATABASE - Update existing entries [Optional]Key parameters:
database_id: Database ID (from search or URL)filter: Filter object matching Notion filter syntaxsorts: Array of sort objectsstart_cursor: Pagination cursor from previous responseproperties: Property values matching database schema for inserts/updatesPitfalls:
3. Manage Blocks and Page Content
When to use: User wants to read, append, or modify content blocks in a page
Tool sequence:
NOTION_FETCH_BLOCK_CONTENTS - Read child blocks of a page [Required]NOTION_ADD_MULTIPLE_PAGE_CONTENT - Append blocks to a page [Optional]NOTION_APPEND_TEXT_BLOCKS - Append text-only blocks [Optional]NOTION_REPLACE_PAGE_CONTENT - Replace all page content [Optional]NOTION_DELETE_BLOCK - Remove a specific block [Optional]Key parameters:
block_id / page_id: Target page or block IDcontent_blocks: Array of block objects (NOT child_blocks)text: Plain text content for APPEND_TEXT_BLOCKSPitfalls:
content_blocks parameter, NOT child_blocks -- the latter fails validation4. Manage Database Schema
When to use: User wants to create databases or modify their structure
Tool sequence:
NOTION_FETCH_DATABASE - Inspect current schema [Prerequisite]NOTION_CREATE_DATABASE - Create a new database [Optional]NOTION_UPDATE_SCHEMA_DATABASE - Modify database properties [Optional]Key parameters:
parent_id: Parent page ID for new databasestitle: Database titleproperties: Property definitions with types and optionsdatabase_id: Database ID for schema updatesPitfalls:
5. Manage Users and Comments
When to use: User wants to list workspace users or manage comments on pages
Tool sequence:
NOTION_LIST_USERS - List all workspace users [Optional]NOTION_GET_ABOUT_ME - Get current authenticated user [Optional]NOTION_CREATE_COMMENT - Add a comment to a page [Optional]NOTION_FETCH_COMMENTS - List comments on a page [Optional]Key parameters:
page_id: Page ID for comments (also called discussion_id)rich_text: Comment content as rich text arrayPitfalls:
Common Patterns
ID Resolution
Page/Database name -> ID:
1. Call NOTION_SEARCH_NOTION_PAGE with query=name
Paginate with has_more/next_cursor until found
Extract id from matching result Database schema inspection:
1. Call NOTION_FETCH_DATABASE with database_id
Extract properties object for field names and types
Use exact property names in queries and inserts Pagination
page_size for results per page (max 100)has_more booleanstart_cursor or next_cursor in next requesthas_more is falseNotion Filter Syntax
Single filter:
{"property": "Status", "select": {"equals": "Done"}}Compound filter:
{"and": [
{"property": "Status", "select": {"equals": "In Progress"}},
{"property": "Assignee", "people": {"contains": "user-id"}}
]}Known Pitfalls
Integration Sharing:
Property Types:
Response Parsing:
data_preview or data.resultsQuick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Search pages/databases | NOTION_SEARCH_NOTION_PAGE | query |
| Create page | NOTION_CREATE_NOTION_PAGE | parent_id, properties |
| Get page metadata | NOTION_RETRIEVE_PAGE | page_id |
| Update page | NOTION_UPDATE_PAGE | page_id, properties |
| Archive page | NOTION_ARCHIVE_NOTION_PAGE | page_id |
| Duplicate page | NOTION_DUPLICATE_PAGE | page_id |
| Get page blocks | NOTION_FETCH_BLOCK_CONTENTS | block_id |
| Append blocks | NOTION_ADD_MULTIPLE_PAGE_CONTENT | page_id, content_blocks |
| Append text | NOTION_APPEND_TEXT_BLOCKS | page_id, text |
| Replace content | NOTION_REPLACE_PAGE_CONTENT | page_id, content_blocks |
| Delete block | NOTION_DELETE_BLOCK | block_id |
| Query database | NOTION_QUERY_DATABASE | database_id, filter, sorts |
| Query with filter | NOTION_QUERY_DATABASE_WITH_FILTER | database_id, filter |
| Insert row | NOTION_INSERT_ROW_DATABASE | database_id, properties |
| Update row | NOTION_UPDATE_ROW_DATABASE | page_id, properties |
| Get database schema | NOTION_FETCH_DATABASE | database_id |
| Create database | NOTION_CREATE_DATABASE | parent_id, title, properties |
| Update schema | NOTION_UPDATE_SCHEMA_DATABASE | database_id, properties |
| List users | NOTION_LIST_USERS | (none) |
| Create comment | NOTION_CREATE_COMMENT | page_id, rich_text |
| List comments | NOTION_FETCH_COMMENTS | page_id |