notion-lifeos
Notion LifeOS Skill
Memory System for Human — A scalable self-awareness system that captures your thoughts, decisions, and growth over decades.
Independent implementation of a Notion-based LifeOS system for OpenClaw agents, based on the PARA method and Make Time framework.
Inspiration: This implementation is inspired by Jeff Su's Notion Command Center YouTube videos. Built from scratch with AI automation features unique to this project.
Design Philosophy
1. Frontend-Backend Separation
- Frontend: Notion (user interface for capture and review)
- Backend: OpenClaw AI agents (automation, processing, insights)
- This separation allows you to switch tools without losing your data structure
2. Database Separation (DP Principle)
- Write: Instant, frictionless capture via natural language
- Process: Deferred, AI-powered organization through Relations
- Philosophy: Capture first, organize later. Never let processing block input.
3. Scalable Self-Awareness
- Every note, task, and decision becomes a data point
- Over time, patterns emerge: how you think, what you value, how you grow
- Ultimate goal: An AI that thinks like you, trained on your actual thought process
See JEFF_SU_SUMMARY.md for detailed design principles.
PARA Method
This system implements the PARA method by Tiago Forte:
- Projects — Short-term goals with deadlines (e.g., "Launch Course", "Run Marathon")
- Areas — Ongoing responsibilities (e.g., Health, Career, Finance)
- Resources — Reference materials and knowledge bases
- Archives — Completed or paused projects
All databases are interconnected through Notion Relations, allowing information to surface automatically where you need it.
What This Skill Does
Enables your OpenClaw AI agent to:
- Create and query tasks, notes, projects, areas, resources
- Manage your PARA system via natural language
- Add daily Make Time journal entries
- Link related items across databases
Setup
1. 获取 Notion API Key
- 访问 Notion Integrations
- 创建新的 Integration,获取 API Key
- 将 API Key 保存到
~/.config/notion/api_key
mkdir -p ~/.config/notion
echo "your_notion_api_key_here" > ~/.config/notion/api_key
chmod 600 ~/.config/notion/api_key
2. 配置数据库 ID
⚠️ 重要:数据库 ID 是私密信息,不要提交到 Git!
方式 A:使用私密配置文件(推荐)
- 复制模板文件:
cp CONFIG.private.md.example CONFIG.private.md
-
编辑
CONFIG.private.md,填入你的真实数据库 ID -
OpenClaw 会优先从
CONFIG.private.md读取 ID(该文件已在.gitignore中)
方式 B:直接编辑 SKILL.md
在下方的「数据库 ID 映射」表格中,将占位符替换为你的真实 ID。
⚠️ 注意:如果直接编辑 SKILL.md,请勿提交到 Git!
# 读取 API Key
NOTION_KEY=$(cat ~/.config/notion/api_key)
API 版本:2025-09-03(此版本 databases 查询走 /v1/data_sources/ 端点)
数据库 ID 映射
OpenClaw 读取顺序:
- 优先读取
CONFIG.private.md(如果存在) - 否则使用下方 SKILL.md 中的 ID
你需要替换以下占位符为你自己的数据库 ID:
| 数据库 | database_id (创建页面用) | data_source_id (查询用) |
|---|---|---|
| Task | YOUR_TASK_DATABASE_ID |
YOUR_TASK_DATA_SOURCE_ID |
| Notes | YOUR_NOTES_DATABASE_ID |
YOUR_NOTES_DATA_SOURCE_ID |
| Areas | YOUR_AREAS_DATABASE_ID |
YOUR_AREAS_DATA_SOURCE_ID |
| Resources | YOUR_RESOURCES_DATABASE_ID |
YOUR_RESOURCES_DATA_SOURCE_ID |
| Projects | YOUR_PROJECTS_DATABASE_ID |
YOUR_PROJECTS_DATA_SOURCE_ID |
| Make Time | YOUR_MAKETIME_DATABASE_ID |
YOUR_MAKETIME_DATA_SOURCE_ID |
LifeOS 根页面:YOUR_LIFEOS_ROOT_PAGE_ID
如何获取 database_id 和 data_source_id?
-
database_id: 打开 Notion 数据库页面,URL 中的 ID 部分(去掉连字符)
- 例如:
https://notion.so/25b119f193ef804a96fec277cc6b45fa→25b119f1-93ef-804a-96fe-c277cc6b45fa
- 例如:
-
data_source_id: 通过 API 查询数据库信息获取
curl -X GET "https://api.notion.com/v1/databases/YOUR_DATABASE_ID" \ -H "Authorization: Bearer $NOTION_KEY" \ -H "Notion-Version: 2025-09-03"
字段结构
Task Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Name | title | 任务名称 |
| Done | checkbox | 是否完成 |
| Due Date | date | 截止日期 |
| Related to Projects | relation | 关联项目 |
| Related to Notes | relation | 关联笔记 |
Notes Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Note | title | 笔记标题 |
| Note Type | select | 笔记类型 |
| Status (状态) | select | 状态 |
| Tags | multi_select | 标签 |
| folder | rich_text | 文件夹 |
| Date | date | 日期 |
| URL | url | 链接 |
| Files & media | files | 附件 |
| Related to Projects | relation | 关联项目 |
| Related to Areas | relation | 关联领域 |
| Related Resources | relation | 关联资源 |
| Created time | created_time | 创建时间 |
| Last edited time | last_edited_time | 最后编辑 |
Areas Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Blog name | title | 领域名称 |
| type | multi_select | 类型标签 |
| Related Notes | relation | 关联笔记 |
| Related Resources | relation | 关联资源 |
| created time | created_time | 创建时间 |
| last edited | last_edited_time | 最后编辑 |
Resources Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Note | title | 资源名称 |
| Resources Type | select | 资源类型 |
| URL | url | 链接 |
| Date | date | 日期 |
| Files & media | files | 附件 |
| Related to Areas | relation | 关联领域 |
| Related to Projects | relation | 关联项目 |
| Related Notes | relation | 关联笔记 |
| Created time | created_time | 创建时间 |
| Last edited time | last_edited_time | 最后编辑 |
Projects Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Log name | title | 项目名称 |
| Status (状态) | select | 状态 |
| End Date | date | 结束日期 |
| Project Folder | rich_text | 项目文件夹 |
| Related Areas | relation | 关联领域 |
| Related Resources | relation | 关联资源 |
| Related Notes | relation | 关联笔记 |
| Created time | created_time | 创建时间 |
| Last edited time | last_edited_time | 最后编辑 |
Make Time Database
| 字段 | 类型 | 说明 |
|---|---|---|
| Name | title | 日期名称 |
| Date | date | 日期 |
| Highlight | rich_text | 今日亮点 |
| Grateful | rich_text | 感恩的事 |
| Let Go | rich_text | 放下的事 |
| Day of the Week | formula | 星期几(自动计算) |
API 使用模式
创建页面(用 database_id)
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "<database_id>"},
"properties": { ... }
}'
查询数据(用 data_source_id)
curl -X POST "https://api.notion.com/v1/data_sources/<data_source_id>/query" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"filter": { ... },
"sorts": [{"property": "Created time", "direction": "descending"}],
"page_size": 10
}'
常用操作示例
创建任务
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "YOUR_TASK_DATABASE_ID"},
"properties": {
"Name": {"title": [{"text": {"content": "任务名称"}}]},
"Due Date": {"date": {"start": "2026-02-25"}},
"Done": {"checkbox": false}
}
}'
创建笔记
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "YOUR_NOTES_DATABASE_ID"},
"properties": {
"Note": {"title": [{"text": {"content": "笔记标题"}}]},
"Note Type": {"select": {"name": "类型"}},
"Tags": {"multi_select": [{"name": "标签1"}]}
}
}'
查询未完成任务
curl -X POST "https://api.notion.com/v1/data_sources/YOUR_TASK_DATA_SOURCE_ID/query" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"filter": {"property": "Done", "checkbox": {"equals": false}},
"sorts": [{"property": "Due Date", "direction": "ascending"}]
}'
查询最近笔记
curl -X POST "https://api.notion.com/v1/data_sources/YOUR_NOTES_DATA_SOURCE_ID/query" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"sorts": [{"property": "Created time", "direction": "descending"}],
"page_size": 10
}'
注意事项
- 创建页面用
database_id,查询用data_source_id,别搞混 - Rate limit: ~3 req/s
- Relation 字段需要目标页面的 page_id
- button 块的自动化配置通过 API 创建时会丢失(data source 引用断裂),button 功能改为直接通过 API 设置 Relation 字段
- 页面内容(正文)通过 blocks API 添加:
PATCH /v1/blocks/{page_id}/children
License
MIT License
Author
Created by Jiahao Shao
- Website: https://jiahao-shao1.github.io/
- Twitter: @jiahaoshao1
- Email: jhshao1027@gmail.com
Acknowledgments
- Built for OpenClaw
- Inspired by Jeff Su's Notion Command Center YouTube videos
- Based on the PARA method by Tiago Forte
- Incorporates Make Time framework by Jake Knapp and John Zeratsky
Disclaimer: This is an independent implementation created by studying publicly available content. It is not affiliated with or endorsed by any paid courses. The AI integration features are unique to this project.