notion-helper

Notion API助手 - 创建和管理Notion页面、数据库,支持笔记和知识管理。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "notion-helper" with this command: npx skills add 534422530/laosi-notion

Notion Helper - Notion助手

激活词: Notion / 笔记管理 / 知识库

安装

pip install notion-client

获取API密钥

  1. 访问 https://www.notion.so/my-integrations
  2. 创建新集成
  3. 复制API密钥
  4. 分享数据库给集成

Python实现

from notion_client import AsyncClient
import asyncio

class NotionHelper:
    def __init__(self, token: str):
        self.client = AsyncClient(auth=token)
    
    async def create_page(self, parent_id: str, title: str, content: str = ""):
        await self.client.pages.create(
            parent={"database_id": parent_id},
            properties={
                "title": {
                    "title": [{"text": {"content": title}}]
                }
            },
            children=[{
                "object": "block",
                "type": "paragraph",
                "paragraph": {
                    "rich_text": [{"type": "text", "text": {"content": content}}]
                }
            }]
        )
    
    async def query_database(self, db_id: str, filter_props: dict = None):
        params = {"database_id": db_id}
        if filter_props:
            params["filter"] = filter_props
        return await self.client.databases.query(**params)
    
    async def update_page(self, page_id: str, properties: dict):
        await self.client.pages.update(page_id, properties=properties)
    
    async def get_page(self, page_id: str):
        return await self.client.pages.retrieve(page_id)
    
    async def search(self, query: str):
        return await self.client.search(query)

使用示例

async def main():
    helper = NotionHelper("secret_xxx")
    
    # 创建页面
    await helper.create_page(
        parent_id="database_id",
        title="AI学习笔记",
        content="今天学习了机器学习..."
    )
    
    # 搜索页面
    results = await helper.search("AI")
    for page in results['results']:
        print(page['title'])
    
    # 查询数据库
    pages = await helper.query_database("database_id")
    for page in pages['results']:
        print(page['properties']['title']['title'][0]['text']['content'])

asyncio.run(main())

数据类型

类型说明
title标题
rich_text文本
number数字
checkbox复选框
select单选
multi_select多选
date日期
url链接
email邮箱
phone_number电话

使用场景

  1. 知识库管理
  2. 任务跟踪
  3. 笔记整理
  4. 项目管理

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Wolai MCP 技能

Wolai MCP skill — 操作 wolai 笔记(块/页面/搜索/数据库)/ Wolai Mcp Skill - Operate wolai notes (blocks, pages, search, database) via MCP protocol

Registry SourceRecently Updated
3802Profile unavailable
General

Wolai API 技能

Wolai API skill — 操作 wolai 笔记(块/页面/数据库)/ Wolai API Skill - Operate wolai notes (blocks, pages, database) via REST API

Registry SourceRecently Updated
3690Profile unavailable
Research

Book Organizer

书籍内容深度整理技能。当用户提到整理书籍内容、读书笔记、制作思维导图、提取金句、总结核心观点时触发。使用场景包括但不限于:(1) 输入书名进行深度整理,(2) 创建章节摘要和思维导图,(3) 提取概念和关键知识点,(4) 整理金句摘录,(5) 总结核心观点,(6) 撰写读后感/书评,(7) 生成知识整理笔记。输出...

Registry SourceRecently Updated
2231Profile unavailable
Research

Prior Openclaw

Knowledge exchange for AI agents. Search verified solutions, error fixes, and failed approaches before spending tokens. Zero setup -- auto-registers on first...

Registry SourceRecently Updated
9360Profile unavailable