calendar-automation

calendar-automation

热门

Google Calendar 和 Outlook 自动化——日程优化、会议工作流、时间块管理以及 Slack/Sheets 集成

306Star
68Fork
更新于 2026/1/31
SKILL.md
只读
名称
calendar-automation
描述

Google Calendar 和 Outlook 自动化——日程优化、会议工作流、时间块管理以及 Slack/Sheets 集成

版本
1.0.0

日历自动化

自动化 Google Calendar 和 Outlook 工作流,实现会议管理、时间块管理、每日摘要和跨平台同步。基于 n8n 工作流模板。

概述

本技能涵盖:

  • 会议日程自动化
  • 时间块策略
  • 每日日历摘要发送到 Slack
  • 会议准备提醒
  • 日历分析

核心工作流

1. 每日日历摘要发送到 Slack

workflow: "晨间日历简报"

schedule: "每天 6:00"

steps:
  1. get_today_events:
      calendar: primary
      time_min: today_start
      time_max: today_end
      
  2. categorize_events:
      categories:
        meetings: has_attendees == true
        focus_time: title contains "专注" OR "深度工作"
        one_on_ones: title contains "1:1" OR "1-on-1"
        interviews: title contains "面试"
        
  3. calculate_stats:
      total_meetings: count(meetings)
      total_hours: sum(duration)
      free_time: 8 - total_hours
      back_to_back: count(gap < 15min)
      
  4. format_message:
      template: |
        ☀️ *早上好!以下是您的一天:*
        
        📅 *{date}*
        
        *日程概览:*
        • {total_meetings} 个会议({total_hours}小时)
        • {free_time}小时空闲时间
        • {back_to_back} 个连续会议 ⚠️
        
        *今日事件:*
        {event_list}
        
        💡 *提示:* {daily_tip}
        
  5. send_to_slack:
      channel: "#daily-schedule" 或 DM
      
  6. log_to_sheets:
      spreadsheet: "日历分析"
      data: [date, meetings, hours, categories]

事件列表格式:

• 9:00 AM - 团队站会 (15分钟) 📞 Zoom
• 10:00 AM - 与 Sarah 一对一 (30分钟) 👥
• 11:00 AM - 专注时间 (2小时) 🧠
• 2:00 PM - 客户电话 (1小时) 🤝 Google Meet
• 4:00 PM - 面试 - PM 岗位 (45分钟) 🎯

2. 会议准备自动化

workflow: "会议准备"

trigger:
  type: calendar_event
  time: 1_hour_before_meeting
  filter: has_attendees AND duration >= 30min

steps:
  1. get_meeting_details:
      extract: [title, attendees, description, meeting_link]
      
  2. research_attendees:
      for_each: attendee
      actions:
        - linkedin_lookup: get_title_company
        - crm_lookup: get_past_interactions
        - email_search: recent_threads
        
  3. generate_prep_doc:
      template: |
        # 会议准备:{title}
        
        **时间:** {start_time}
        **时长:** {duration}
        **链接:** {meeting_link}
        
        ## 参会者
        {attendee_profiles}
        
        ## 背景
        - 上次互动:{last_meeting_date}
        - 待办事项:{open_tasks}
        - 近期邮件:{email_summary}
        
        ## 建议议程
        {ai_suggested_agenda}
        
        ## 讨论要点
        {ai_talking_points}
        
  4. send_reminder:
      slack_dm:
        message: |
          ⏰ 会议还有1小时:*{title}*
          
          📋 [准备文档]({prep_doc_link})
          🔗 [加入会议]({meeting_link})
          
          快速背景:{one_line_summary}

3. 智能时间块管理

workflow: "自动时间块"

schedule: "周日晚上8点" # 为下周做计划

steps:
  1. analyze_calendar:
      range: next_7_days
      identify:
        - existing_meetings
        - recurring_meetings
        - available_slots
        
  2. get_priorities:
      source: [todoist, asana, notion]
      filter: due_this_week AND high_priority
      
  3. allocate_focus_time:
      rules:
        - morning_block: 9-11am (深度工作)
        - afternoon_block: 2-4pm (协作)
        - minimum_gap: 15min 会议间隔
        - max_meetings_per_day: 5
        
  4. create_blocks:
      types:
        deep_work:
          duration: 2h
          frequency: daily
          preferred_time: 9-11am
          color: blue
          
        admin_time:
          duration: 1h
          frequency: daily
          preferred_time: 4-5pm
          color: gray
          
        buffer:
          duration: 15min
          after: external_meetings
          color: yellow
          
  5. notify:
      slack: "✅ 每周时间块已创建。已保护 {x} 小时的专注时间。"

4. Calendly → 日历 + CRM

workflow: "Calendly 预订处理"

trigger:
  type: calendly
  event: booking_created

steps:
  1. get_booking_details:
      extract: [invitee, event_type, scheduled_time, answers]
      
  2. enrich_contact:
      clearbit: lookup_by_email
      linkedin: get_profile
      
  3. create_calendar_event:
      google_calendar:
        title: "{event_type} 与 {invitee_name}"
        time: scheduled_time
        description: |
          **通过 Calendly 预订**
          
          姓名:{invitee_name}
          邮箱:{invitee_email}
          公司:{company}
          
          **会前问题:**
          {calendly_answers}
        attendees: [invitee_email, owner_email]
        reminders: [1_day, 1_hour, 15_min]
        
  4. update_crm:
      hubspot:
        create_or_update_contact:
          email: invitee_email
          properties:
            last_meeting_booked: scheduled_time
            meeting_type: event_type
        create_engagement:
          type: MEETING
          timestamp: scheduled_time
          
  5. send_confirmation:
      email:
        to: invitee_email
        template: meeting_confirmation
        include: [calendar_invite, prep_questions]
        
  6. notify_slack:
      channel: "#meetings"
      message: "📅 新预订:{event_type} 与 {invitee_name} 于 {date}"

5. 日历分析

analytics_workflow:
  name: "每周日历报告"
  schedule: "周五下午5点"
  
  metrics:
    time_distribution:
      - meetings_total_hours
      - focus_time_hours
      - admin_time_hours
      - 1on1_time_hours
      
    meeting_quality:
      - avg_meeting_length
      - back_to_back_count
      - meetings_with_agenda
      - external_vs_internal
      
    productivity:
      - longest_focus_block
      - fragmentation_score
      - after_hours_meetings
      
  output:
    format: markdown
    destinations: [slack, google_sheets]
    
  report_template: |
    # 📊 每周日历分析
    
    ## 时间分布
    | 类别 | 小时数 | 占周百分比 |
    |----------|-------|-----------|
    | 会议 | {meetings_hours} | {meetings_pct}% |
    | 专注时间 | {focus_hours} | {focus_pct}% |
    | 行政事务 | {admin_hours} | {admin_pct}% |
    | 空闲时间 | {available_hours} | {available_pct}% |
    
    ## 会议洞察
    - 总会议数:{total_meetings}
    - 平均时长:{avg_length} 分钟
    - 连续会议:{b2b_count}({b2b_pct}%)
    - 有议程:{agenda_pct}%
    
    ## 生产力评分
    🎯 **{productivity_score}/100**
    
    - 最长专注块:{longest_focus}
    - 会议碎片化:{fragmentation}
    - 非工作时间会议:{after_hours_count}
    
    ## 建议
    {ai_recommendations}

时间块模板

创作者日程(个人贡献者)

┌─────────────────────────────────────┐
│ 9:00 - 11:00  │ 深度工作块 1        │
├─────────────────────────────────────┤
│ 11:00 - 11:30 │ 邮件/Slack          │
├─────────────────────────────────────┤
│ 11:30 - 12:30 │ 会议窗口            │
├─────────────────────────────────────┤
│ 12:30 - 1:30  │ 午餐                │
├─────────────────────────────────────┤
│ 1:30 - 3:30   │ 深度工作块 2        │
├─────────────────────────────────────┤
│ 3:30 - 4:00   │ 缓冲/行政事务       │
├─────────────────────────────────────┤
│ 4:00 - 5:00   │ 会议窗口            │
├─────────────────────────────────────┤
│ 5:00 - 5:30   │ 每日总结            │
└─────────────────────────────────────┘

管理者日程

┌─────────────────────────────────────┐
│ 8:00 - 8:30   │ 每日计划            │
├─────────────────────────────────────┤
│ 8:30 - 9:00   │ 团队站会            │
├─────────────────────────────────────┤
│ 9:00 - 12:00  │ 一对一/会议         │
├─────────────────────────────────────┤
│ 12:00 - 1:00  │ 午餐                │
├─────────────────────────────────────┤
│ 1:00 - 2:00   │ 专注时间            │
├─────────────────────────────────────┤
│ 2:00 - 5:00   │ 会议                │
├─────────────────────────────────────┤
│ 5:00 - 5:30   │ 邮件/总结           │
└─────────────────────────────────────┘

输出示例

请求:"为我的 Slack 设置每日日历摘要"

输出

# 每日日历摘要设置

## 工作流配置

```yaml
name: "晨间日历简报"
schedule: "工作日 6:00"
timezone: "Asia/Shanghai"

trigger:
  type: cron
  expression: "0 6 * * 1-5"

actions:
  1. fetch_events:
      calendar: primary
      date: today
      
  2. send_slack:
      channel: "@you" # 或 #your-channel

示例输出

☀️ 早上好!以下是您的周四:

📅 2026年1月30日

━━━━━━━━━━━━━━━━━━━━━━

📊 概览:
• 5 个会议(4.5小时)
• 3.5小时空闲时间
• 1 个连续会议警告 ⚠️

━━━━━━━━━━━━━━━━━━━━━━

🗓️ 日程:

9:00 AM │ 团队站会 (15分钟)
        │ 📞 Google Meet
        │
10:00 AM │ 与 Sarah 一对一 (30分钟)
         │ 👥 会议室 B
         │
11:00 AM │ 🧠 专注时间 (2小时)
         │ 
1:00 PM │ 午餐
        │
2:00 PM │ 客户电话 - Acme (1小时)
        │ 🤝 Zoom(链接已附)
        │
3:30 PM │ 产品评审 (1小时)
        │ 📋 议程已附
        │
5:00 PM │ ✅ 一天结束

━━━━━━━━━━━━━━━━━━━━━━

💡 提示:您有2小时的专注时间——处理最高优先级的任务吧!

n8n 设置说明

  1. 创建新工作流
  2. 添加 Schedule Trigger 节点(工作日6点)
  3. 添加 Google Calendar 节点(获取事件)
  4. 添加 Code 节点(格式化消息)
  5. 添加 Slack 节点(发送消息)
  6. 激活工作流

需要我生成完整的 n8n 工作流 JSON 吗?


---

*日历自动化技能 - Claude Office 技能系列的一部分*