Notion Diary
Use this skill to turn user input into a diary entry or a short 24-hour report, then sync it into Notion through the bundled Python helper at {baseDir}/scripts/notion_diary_sync.py.
Command Surface
OpenClaw sanitizes the skill name to the slash command /notion_diary.
Accept these command patterns:
- - INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
Chinese aliases are also valid:
- -
diary -> INLINECODE7 - INLINECODE8 -> INLINECODE9
- INLINECODE10 -> INLINECODE11
Treat the first token after /notion_diary as the mode. Parse date= and style= when present. Everything else in the message is source material for the entry.
Style Presets
Support exactly four preset styles. Read references/style-presets.md before drafting when the user does not define their own style.
- -
plain: concise, factual, diary-as-log. - INLINECODE16 : warm, smooth, personal.
- INLINECODE17 : restrained, lived-in, slightly introspective. Prefer this by default.
- INLINECODE18 : more scene and atmosphere, but still grounded.
If the user gives no style, use:
- 1.
reflective when the material contains emotion, travel, or relationships. - INLINECODE20 when the material is mostly work updates.
Authorization And Runtime Inputs
This skill expects NOTION_API_KEY to be injected by OpenClaw. Read references/openclaw-config.example.jsonc before first use.
Keep this package registry-safe:
- - Do not bundle real API keys.
- Do not bundle personal page ids, data source ids, or workspace-specific URLs.
- Keep the example config fully placeholder-based so the skill can be published to ClawHub safely.
Optional environment variables:
- -
NOTION_DIARY_DATA_SOURCE_ID: preferred existing target. - INLINECODE23 : existing database id if the data source id is not known.
- INLINECODE24 : parent page used to find or create the
Daily Journal database. - INLINECODE26 : default database title. Defaults to
Daily Journal. - INLINECODE28 : default style code. Defaults to
reflective.
Prefer NOTION_DIARY_DATA_SOURCE_ID when available. If it is missing, use NOTION_DIARY_DATABASE_ID. If both are missing, use NOTION_DIARY_PARENT_PAGE_ID to locate or create the diary database.
The script creates a date-ready database schema. If you want a visible calendar layout in Notion, create the calendar view once in the Notion UI using the Date property.
Diary Workflow
- 1. Parse the mode, date, and style.
- Gather the raw diary material from the command body, the attached text, and the current conversation context.
- Draft a first-pass diary in the requested style without inventing facts.
- After the first pass, ask 1 to 3 targeted follow-up questions that help deepen missing moments, transitions, or emotional shifts.
- Revise the diary with the user's answers.
- Create or update the Notion entry for that date through the bundled script.
Only skip the follow-up questions when one of these is true:
- - the user explicitly says to sync immediately
- the material is already complete enough for a polished diary
- the mode is
report24h and the user asked for a short brief rather than a refined diary
Prefer titles in this shape:
Prefer a short summary sentence for the Notion Summary property.
Follow-Up Question Rules
Ask questions that improve the diary rather than expand it mechanically.
- - Prefer questions about one missing moment, one emotional turn, or one concrete detail.
- Ask at most 3 questions.
- Ask only what would noticeably improve the final diary.
- Keep the questions short and specific.
Good follow-up examples:
- - 当时你最强烈的感受是什么?
- 下午去古城的时候,现场的状态更像是轻松、匆忙,还是有点收尾的感觉?
- 晚上学 AI 时,你是兴奋、平静,还是有点疲惫但充实?
Avoid generic questions like:
24-Hour Report Workflow
Use this mode when:
- - the user explicitly invokes
report24h or INLINECODE38 - the user invokes
auto and there is no usable diary material for today - the user asks for a short daily recap instead of a full diary
Before drafting a 24-hour report:
- 1. Use
sessions_list to identify the current sender's most relevant session from the last 24 hours. - Prefer the literal key
main for direct chat when it is clearly the active thread. - Use
sessions_history to fetch the recent transcript. Keep includeTools off unless tool outputs are part of the substance the user wants summarized. - Summarize only the last 24 hours of visible conversation for the relevant session. Do not pull unrelated sessions unless the user explicitly asks for a broader recap.
The 24-hour report must stay shorter than a full diary:
- - 1 short summary paragraph
- 2 to 5 bullets or short paragraphs for key actions, blockers, and progress
- no embellished storytelling unless the user explicitly asks for it
If a proper diary entry for today already exists and the user asks for auto, prefer updating that diary instead of generating a separate short report.
Photo Handling
When the user provides one or more photos, insert image placement markers into the content before calling the sync script:
- - INLINECODE45
- INLINECODE46
Each marker must appear on its own line between paragraphs. Pass the real local file paths or public URLs through repeated --image arguments to the script in the same order.
If there are images but no obvious placement, append them after the body.
When image paths or public image URLs are available, the sync should do all three:
- - insert the photos into the page body at the matching marker positions
- write the photos into the Notion
Photos property - use the first valid photo as the page cover
Sync Script
Use {baseDir}/scripts/notion_diary_sync.py.
Typical calls:
CODEBLOCK0
CODEBLOCK1
CODEBLOCK2
The script will:
- - find or create the diary database
- create or update the page for the target date and mode
- store the body in page content
- keep
Title, Date, Mode, Style, and Summary properties in sync - best-effort upload local images up to 20 MB through the Notion file upload API
- populate the
Photos property and page cover when photos are provided
Drafting Rules
- - Mirror the user's language unless asked otherwise.
- Keep facts intact and do not invent details.
- For
plain, optimize for clear sequence and compactness. - For
gentle, allow warmth but keep it natural. - For
reflective, use the user's preferred balanced style: first set the day's overall state, then move through concrete events and emotional changes gradually. - For
reflective, the priority is not “more literary”; the priority is natural pacing, light transitions, and a sense of inner movement without over-writing. - Let the sentences breathe a little, but keep them readable and grounded.
- For
lyrical, add atmosphere lightly; do not become purple or melodramatic.
Failure Handling
- - If the Notion API key is missing, explain that the skill needs
skills.entries["notion-diary"].apiKey or NOTION_API_KEY. - If the integration cannot access the target page or database, ask the user to share the parent page with the integration and provide the correct page or data source id.
- If image upload fails, keep the diary sync successful and add a short text fallback instead of failing the whole run.
- If some images fail but others succeed, keep the successful photos in Notion and fall back to text only for the failed ones.
- If session history is unavailable for
report24h, summarize only the visible recent chat and say that the report used a limited context window.
Resources
Notion 日记
使用此技能将用户输入转化为日记条目或简短的 24 小时报告,然后通过 {baseDir}/scripts/notiondiarysync.py 中附带的 Python 辅助程序同步到 Notion。
命令界面
OpenClaw 将技能名称规范化为斜杠命令 /notion_diary。
接受以下命令模式:
- - /notiondiary diary style=
- /notiondiary diary date= style=<...>
- /notiondiary report24h style=
- /notiondiary auto style=<...>
中文别名同样有效:
- - diary -> 日记
- report24h -> 日报
- auto -> 自动
将 /notion_diary 后的第一个词视为模式。当存在时解析 date= 和 style=。消息中的其他所有内容都是条目的原始素材。
风格预设
支持恰好四种预设风格。当用户未定义自己的风格时,在起草前先阅读 references/style-presets.md。
- - plain:简洁、事实性、日志式日记。
- gentle:温暖、流畅、个人化。
- reflective:克制、有生活感、略带内省。默认优先使用此风格。
- lyrical:更多场景和氛围,但仍保持脚踏实地。
如果用户未指定风格,则使用:
- 1. 当素材包含情感、旅行或人际关系时,使用 reflective。
- 当素材主要是工作更新时,使用 plain。
授权与运行时输入
此技能期望 OpenClaw 注入 NOTIONAPIKEY。首次使用前请阅读 references/openclaw-config.example.jsonc。
保持此包注册表安全:
- - 不要捆绑真实的 API 密钥。
- 不要捆绑个人页面 ID、数据源 ID 或工作区特定的 URL。
- 保持示例配置完全基于占位符,以便技能可以安全地发布到 ClawHub。
可选环境变量:
- - NOTIONDIARYDATASOURCEID:首选现有目标。
- NOTIONDIARYDATABASEID:如果不知道数据源 ID,则为现有数据库 ID。
- NOTIONDIARYPARENTPAGEID:用于查找或创建每日日志数据库的父页面。
- NOTIONDIARYDATABASENAME:默认数据库标题。默认为每日日志。
- NOTIONDIARYDEFAULT_STYLE:默认风格代码。默认为 reflective。
当可用时优先使用 NOTIONDIARYDATASOURCEID。如果缺失,则使用 NOTIONDIARYDATABASEID。如果两者都缺失,则使用 NOTIONDIARYPARENTPAGE_ID 来定位或创建日记数据库。
脚本会创建一个支持日期的数据库架构。如果你希望在 Notion 中看到可见的日历布局,请在 Notion UI 中使用日期属性创建一次日历视图。
日记工作流程
- 1. 解析模式、日期和风格。
- 从命令正文、附带的文本和当前对话上下文中收集原始日记素材。
- 以请求的风格起草初版日记,不编造事实。
- 初版之后,提出 1 到 3 个有针对性的后续问题,帮助深化缺失的时刻、过渡或情感变化。
- 根据用户的回答修改日记。
- 通过附带的脚本创建或更新该日期的 Notion 条目。
仅在以下情况之一成立时跳过后续问题:
- - 用户明确表示立即同步
- 素材已经足够完整,可以写出精美的日记
- 模式是 report24h 且用户要求简短简报而非精炼日记
标题偏好以下格式:
对于 Notion 的摘要属性,偏好使用简短的摘要句。
后续提问规则
提出能改进日记的问题,而非机械地扩展内容。
- - 优先询问关于一个缺失时刻、一个情感转折或一个具体细节的问题。
- 最多提出 3 个问题。
- 只问那些能显著改善最终日记的问题。
- 保持问题简短且具体。
好的后续问题示例:
- - 当时你最强烈的感受是什么?
- 下午去古城的时候,现场的状态更像是轻松、匆忙,还是有点收尾的感觉?
- 晚上学 AI 时,你是兴奋、平静,还是有点疲惫但充实?
避免像这样的通用问题:
24 小时报告工作流程
在以下情况下使用此模式:
- - 用户明确调用 report24h 或 日报
- 用户调用 auto 且今天没有可用的日记素材
- 用户要求简短每日回顾而非完整日记
在起草 24 小时报告之前:
- 1. 使用 sessionslist 识别当前发送者过去 24 小时内最相关的会话。
- 当直接聊天明显是活跃线程时,优先使用字面键 main。
- 使用 sessionshistory 获取最近的对话记录。除非工具输出是用户想要总结的内容的一部分,否则保持 includeTools 关闭。
- 仅总结相关会话过去 24 小时内的可见对话。除非用户明确要求更广泛的回顾,否则不要拉取不相关的会话。
24 小时报告必须比完整日记更短:
- - 1 个简短摘要段落
- 2 到 5 个要点或短段落,用于关键行动、阻碍和进展
- 除非用户明确要求,否则不要添加修饰性的叙述
如果今天已有合适的日记条目且用户要求 auto,则优先更新该日记而非生成单独的简短报告。
照片处理
当用户提供一张或多张照片时,在调用同步脚本之前将图片放置标记插入内容中:
每个标记必须单独成行,位于段落之间。通过重复的 --image 参数以相同顺序将真实的本地文件路径或公共 URL 传递给脚本。
如果有图片但没有明显的位置,则将它们附加在正文之后。
当图片路径或公共图片 URL 可用时,同步应完成以下三项:
- - 在匹配的标记位置将照片插入页面正文
- 将照片写入 Notion 的照片属性
- 使用第一张有效照片作为页面封面
同步脚本
使用 {baseDir}/scripts/notiondiarysync.py。
典型调用:
bash
python3 {baseDir}/scripts/notiondiarysync.py lookup \
--date 2026-03-28 \
--mode diary
bash
python3 {baseDir}/scripts/notiondiarysync.py sync \
--date 2026-03-28 \
--mode diary \
--style reflective \
--title 2026-03-28 | 曼谷的最后一天 \
--summary 曼谷最后一天的收尾、想念和被回应。 \
--content-file /tmp/diary.txt \
--image /absolute/path/photo1.jpg
bash
python3 {baseDir}/scripts/notiondiarysync.py sync \
--date 2026-03-28 \
--mode report \
--style plain \
--title 2026-03-28 | 24h 简短日报 \
--summary 过去 24 小时的工作与交流简报。 \
--content-file /tmp/report.txt
脚本将:
- - 查找或创建日记数据库
- 为目标日期和模式创建或更新页面
- 将正文存储在页面内容中
- 保持标题、日期、模式、风格和摘要属性同步
- 尽力通过 Notion 文件上传 API 上传最大 20 MB 的本地图片
- 当提供照片时填充照片属性和页面封面
起草规则
- - 除非另有要求,否则镜像用户的语言。
- 保持事实完整,不编造细节。
- 对于 plain,优化清晰的顺序和简洁性。
- 对于 gentle,允许温暖但保持自然。
- 对于 reflective,使用用户偏好的平衡风格:先设定一天的整体状态,然后逐渐展开具体事件和情感变化。
- 对于 reflective,优先级不是更文学化;优先级是自然的节奏、轻巧的过渡,以及不过度书写下的内在运动感。
- 让句子稍微呼吸,但保持可读性和脚踏实地。
- 对于 lyrical,轻描淡写地添加氛围;不要变得华丽或夸张。
失败处理
- - 如果缺少 Notion API 密钥,解释技能需要 skills.entries[notion-diary].apiKey 或 NOTIONAPIKEY。
- 如果集成无法访问目标页面或数据库,请用户与集成共享父页面并提供正确的页面或数据源 ID。
- 如果图片上传失败,保持日记同步成功并添加简