SKILL.md
只读
名称
notion-automation
描述
Notion 数据库自动化——同步、模板、工作流及跨平台集成
版本
1.0.0
Notion 自动化
通过跨平台集成、模板和智能触发器自动化 Notion 数据库和工作流。基于 n8n 的 Notion 工作流模板。
概述
本技能涵盖:
- 数据库自动化与触发器
- 模板与页面创建
- 跨平台同步(Slack、日历、CRM)
- 内容管理工作流
- 团队协作自动化
核心工作流
1. 表单 → Notion 数据库
workflow: "表单到 Notion"
trigger: typeform_submission OR google_form
steps:
1. capture_data:
fields: [name, email, company, message, source]
2. enrich_data:
clearbit: lookup_by_email
append: [company_size, industry]
3. create_notion_page:
database_id: "leads_database"
properties:
Name: "{name}"
Email: "{email}"
Company: "{company}"
Status: "New"
Source: "{source}"
Created: "{timestamp}"
content:
- heading: "联系方式"
- text: "{message}"
- divider
- heading: "丰富数据"
- text: "行业: {industry}, 规模: {company_size}"
4. notify:
slack:
channel: "#new-leads"
message: "新线索: {name} 来自 {company}"
2. Notion → 邮件摘要
workflow: "每周 Notion 摘要"
schedule: "周一 9:00"
steps:
1. query_notion:
database: "Tasks"
filter:
- property: "截止日期"
date: this_week
- property: "状态"
not_equals: "已完成"
2. group_by_assignee:
method: aggregate
3. generate_digest:
for_each: assignee
template: |
你好 {assignee},
以下是本周的任务:
{for task in tasks}
• {task.title} - 截止: {task.due_date}
{endfor}
总计: {task_count} 个任务
4. send_emails:
to: each_assignee
subject: "您的每周任务摘要"
3. Slack → Notion 任务
workflow: "Slack 到 Notion 任务"
trigger: slack_reaction (✅ emoji)
steps:
1. capture_message:
extract: [text, author, channel, timestamp, thread]
2. parse_task:
ai_extraction:
title: extract_action_item
due_date: extract_date_if_mentioned
priority: infer_from_context
3. create_notion_task:
database: "Tasks"
properties:
Title: "{extracted_title}"
Status: "待办"
Source: "Slack - #{channel}"
Assignee: "{slack_user_to_notion_user}"
Due Date: "{due_date}"
Priority: "{priority}"
content:
- quote: "{original_message}"
- text: "从 Slack 消息创建"
- link: "{slack_permalink}"
4. thread_reply:
slack:
thread_ts: "{timestamp}"
message: "✅ 任务已在 Notion 中创建: {notion_url}"
4. 日历同步
workflow: "Google 日历 ↔ Notion"
trigger: bidirectional
google_to_notion:
trigger: calendar_event_created
action:
- create_notion_page:
database: "会议"
properties:
Title: "{event.title}"
Date: "{event.start}"
Attendees: "{event.attendees}"
Location: "{event.location}"
Calendar Link: "{event.link}"
notion_to_google:
trigger: notion_page_created
filter: database == "会议"
action:
- create_calendar_event:
title: "{page.Title}"
start: "{page.Date}"
description: "{page.Notes}"
attendees: "{page.Attendees}"
5. 内容管道
workflow: "内容发布管道"
database_structure:
properties:
- Title: title
- Status: select [想法, 写作, 审核, 已发布]
- Author: person
- Due Date: date
- Platform: multi_select [博客, LinkedIn, Twitter]
- Content: rich_text
automations:
status_changed_to_review:
- notify_slack: "#content-review"
- assign_reviewer: round_robin
- set_due_date: 3_days_from_now
status_changed_to_published:
- post_to_platforms: based_on_Platform_property
- update_analytics_tracker: add_row
- archive_after: 7_days
数据库模板
项目管理
project_database:
name: "项目"
properties:
- Name: title
- Status: select
options: [规划中, 进行中, 审核中, 已完成]
- Priority: select
options: [P0, P1, P2, P3]
- Owner: person
- Team: multi_select
- Start Date: date
- Due Date: date
- Progress: number (百分比)
- Related Tasks: relation → 任务
views:
- Board: group_by Status
- Timeline: gantt chart
- Calendar: by Due Date
- Table: all properties
automations:
- when: all_tasks_complete
then: set_status "已完成"
- when: due_date_approaching (3 天)
then: slack_reminder to Owner
CRM 数据库
crm_database:
name: "联系人"
properties:
- Name: title
- Email: email
- Company: text
- Stage: select
options: [线索, 合格, 提案, 谈判, 已成交]
- Value: number (货币)
- Last Contact: date
- Next Action: text
- Owner: person
- Related Deals: relation → 交易
automations:
- when: stage_changed
then: log_activity + notify_owner
- when: no_contact_14_days
then: slack_alert "需要跟进"
内容日历
content_calendar:
name: "内容"
properties:
- Title: title
- Type: select [博客, 视频, 社交, 新闻通讯]
- Status: select [想法, 草稿, 审核, 已排期, 已发布]
- Publish Date: date
- Author: person
- Platform: multi_select
- SEO Keywords: multi_select
- Engagement: number
views:
- Calendar: by Publish Date
- Kanban: by Status
- By Platform: grouped table
API 模式
查询数据库
// n8n Notion 查询
{
"database_id": "abc123",
"filter": {
"and": [
{
"property": "状态",
"select": {
"equals": "进行中"
}
},
{
"property": "截止日期",
"date": {
"on_or_before": "{{$today}}"
}
}
]
},
"sorts": [
{
"property": "优先级",
"direction": "ascending"
}
]
}
创建页面
// n8n Notion 创建页面
{
"parent": { "database_id": "abc123" },
"properties": {
"名称": {
"title": [{ "text": { "content": "{{$json.title}}" }}]
},
"状态": {
"select": { "name": "新建" }
},
"标签": {
"multi_select": [
{ "name": "{{$json.tag1}}" },
{ "name": "{{$json.tag2}}" }
]
}
},
"children": [
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [{ "text": { "content": "概述" }}]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{ "text": { "content": "{{$json.content}}" }}]
}
}
]
}
集成方案
Notion + Slack + 日历
meeting_workflow:
trigger: notion_page_created
database: "会议"
actions:
1. create_calendar_event:
google_calendar:
title: "{Title}"
date: "{Date}"
2. create_slack_channel:
if: "{Type}" == "项目启动"
name: "proj-{project_name}"
3. send_invites:
to: "{Attendees}"
include: [calendar_link, notion_link, slack_channel]
4. create_meeting_doc:
notion:
template: "会议记录模板"
link_to: original_page
Notion + GitHub
github_sync:
trigger: github_issue_created
actions:
- create_notion_page:
database: "工程任务"
properties:
Title: "{issue.title}"
GitHub: "{issue.url}"
Labels: "{issue.labels}"
Assignee: map_github_to_notion("{issue.assignee}")
reverse_sync:
trigger: notion_status_changed
to: "已完成"
action: close_github_issue
输出示例
请求: "为内容团队设置 Notion 自动化"
输出:
# 内容团队 Notion 设置
## 数据库: 内容日历
### 属性
| 属性 | 类型 | 选项 |
|----------|------|---------|
| 标题 | Title | - |
| 状态 | Select | 想法, 写作, 编辑, 就绪, 已发布 |
| 作者 | Person | - |
| 发布日期 | Date | - |
| 平台 | Multi-select | 博客, LinkedIn, Twitter, 新闻通讯 |
| 类型 | Select | 文章, 视频, 信息图, 帖子 |
### 自动化
**1. 新内容想法 → Slack**
```yaml
trigger: page_created, Status = "想法"
action: post_to_slack("#content-ideas")
message: "💡 新内容想法: {Title} 由 {Author}"
2. 准备审核 → 分配编辑
trigger: status_changed_to "编辑"
action:
- assign_editor (round_robin)
- set_due_date (+3 天)
- slack_dm_editor
3. 已发布 → 更新追踪器
trigger: status_changed_to "已发布"
action:
- add_to_analytics_sheet
- post_celebration_slack
- schedule_engagement_check (+7 天)
视图
- 日历 - 查看发布计划
- 看板 - 跟踪状态
- 按作者 - 个人工作量
- 本周 - 筛选视图
模板
- 博客文章模板
- 社交帖子模板
- 新闻通讯模板
---
*Notion 自动化技能 - Claude Office 技能集的一部分*






