notion-automation

notion-automation

熱門

Notion 資料庫自動化 - 同步、範本、工作流程與跨平台整合

316星標
69分支
更新於 2026/1/31
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 點"

steps:
  1. query_notion:
      database: "Tasks"
      filter:
        - property: "Due Date"
          date: this_week
        - property: "Status"
          not_equals: "Done"
          
  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: "To Do"
        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 Calendar ↔ Notion"
trigger: bidirectional

google_to_notion:
  trigger: calendar_event_created
  action:
    - create_notion_page:
        database: "Meetings"
        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 == "Meetings"
  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 [Idea, Writing, Review, Published]
    - Author: person
    - Due Date: date
    - Platform: multi_select [Blog, 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: "Projects"
  properties:
    - Name: title
    - Status: select
        options: [Planning, In Progress, Review, Complete]
    - Priority: select
        options: [P0, P1, P2, P3]
    - Owner: person
    - Team: multi_select
    - Start Date: date
    - Due Date: date
    - Progress: number (percent)
    - Related Tasks: relation → Tasks
    
  views:
    - Board: group_by Status
    - Timeline: gantt chart
    - Calendar: by Due Date
    - Table: all properties
    
  automations:
    - when: all_tasks_complete
      then: set_status "Complete"
    - when: due_date_approaching (3 days)
      then: slack_reminder to Owner

CRM 資料庫

crm_database:
  name: "Contacts"
  properties:
    - Name: title
    - Email: email
    - Company: text
    - Stage: select
        options: [Lead, Qualified, Proposal, Negotiation, Closed]
    - Value: number (currency)
    - Last Contact: date
    - Next Action: text
    - Owner: person
    - Related Deals: relation → Deals
    
  automations:
    - when: stage_changed
      then: log_activity + notify_owner
    - when: no_contact_14_days
      then: slack_alert "需要跟進"

內容日曆

content_calendar:
  name: "Content"
  properties:
    - Title: title
    - Type: select [Blog, Video, Social, Newsletter]
    - Status: select [Idea, Draft, Review, Scheduled, Published]
    - 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 Query
{
  "database_id": "abc123",
  "filter": {
    "and": [
      {
        "property": "Status",
        "select": {
          "equals": "In Progress"
        }
      },
      {
        "property": "Due Date",
        "date": {
          "on_or_before": "{{$today}}"
        }
      }
    ]
  },
  "sorts": [
    {
      "property": "Priority",
      "direction": "ascending"
    }
  ]
}

建立頁面

// n8n Notion Create Page
{
  "parent": { "database_id": "abc123" },
  "properties": {
    "Name": {
      "title": [{ "text": { "content": "{{$json.title}}" }}]
    },
    "Status": {
      "select": { "name": "New" }
    },
    "Tags": {
      "multi_select": [
        { "name": "{{$json.tag1}}" },
        { "name": "{{$json.tag2}}" }
      ]
    }
  },
  "children": [
    {
      "object": "block",
      "type": "heading_2",
      "heading_2": {
        "rich_text": [{ "text": { "content": "Overview" }}]
      }
    },
    {
      "object": "block",
      "type": "paragraph",
      "paragraph": {
        "rich_text": [{ "text": { "content": "{{$json.content}}" }}]
      }
    }
  ]
}

整合食譜

Notion + Slack + 日曆

meeting_workflow:
  trigger: notion_page_created
  database: "Meetings"
  
  actions:
    1. create_calendar_event:
        google_calendar:
          title: "{Title}"
          date: "{Date}"
          
    2. create_slack_channel:
        if: "{Type}" == "Project Kickoff"
        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: "Engineering Tasks"
        properties:
          Title: "{issue.title}"
          GitHub: "{issue.url}"
          Labels: "{issue.labels}"
          Assignee: map_github_to_notion("{issue.assignee}")
          
  reverse_sync:
    trigger: notion_status_changed
    to: "Done"
    action: close_github_issue

輸出範例

請求:"為內容團隊設定 Notion 自動化"

輸出

# 內容團隊 Notion 設定

## 資料庫:內容日曆

### 屬性
| 屬性 | 類型 | 選項 |
|----------|------|---------|
| Title | Title | - |
| Status | Select | Idea, Writing, Editing, Ready, Published |
| Author | Person | - |
| Publish Date | Date | - |
| Platform | Multi-select | Blog, LinkedIn, Twitter, Newsletter |
| Type | Select | Article, Video, Infographic, Thread |

### 自動化

**1. 新內容點子 → Slack**
```yaml
trigger: page_created, Status = "Idea"
action: post_to_slack("#content-ideas")
message: "💡 新內容點子:{Title} 由 {Author} 提出"

2. 準備審核 → 指派編輯

trigger: status_changed_to "Editing"
action: 
  - assign_editor (round_robin)
  - set_due_date (+3 days)
  - slack_dm_editor

3. 已發布 → 更新追蹤表

trigger: status_changed_to "Published"
action:
  - add_to_analytics_sheet
  - post_celebration_slack
  - schedule_engagement_check (+7 days)

檢視方式

  1. Calendar - 查看發布時程
  2. Kanban - 追蹤狀態
  3. By Author - 個人工作量
  4. This Week - 篩選檢視

範本

  • 部落格文章範本
  • 社群貼文範本
  • 電子報範本

---

*Notion 自動化技能 - Claude Office Skills 的一部分*