跳轉到

外掛系統與設定 (Plugins)

內建插件列表

插件 功能
add_category AI 分析郵件並自動加上分類標籤
move_to_folder AI 分析內容判斷應該移動到哪個資料夾
create_appointment AI 分析郵件內容建立行事曆約會
event_table AI 分析郵件內容並將活動資訊追加到 Excel 表格(含 Outlook 開信連結)
write_file 將郵件資料儲存為 JSON 檔案
summary_file AI 產生郵件摘要並追加到 CSV 表格

路徑規則:output_dir / output_file 若使用相對路徑,會以當前設定檔目錄(config/config.yaml 所在目錄)為基準。 💡 實際設定檔位置放在 C:\Users\{username}\AppData\Roaming\mailslide\config\plugins\

個別外掛設定

write_file 插件設定

建議在 Configuration → Plugin 設定 選取 write_file 後編輯;也可手動改 config/plugins/write_file.yaml

enabled: true
output_dir: "output"           # 輸出目錄
filename_format: "{subject}_{timestamp}"  # 檔名格式
include_fields:                # 要包含的欄位
  - subject
  - sender
  - received
  - body
  - tables

include_fields: 欄位固定,不可修改

event_table 插件設定

建議在 Configuration → Plugin 設定 選取 event_table 後編輯;也可手動改 config/plugins/event_table.yaml

enabled: true
output_file: "output/events.xlsx"   # 單一 Excel,預設 job 級批次 flush
open_command_match_sender: false    # outlook_open_command 是否額外比對寄件者

Excel 欄位由程式固定,順序為: email_subject, email_sender, email_received, email_entry_id, outlook_open_command, event_subject, start, end, location, body, logged_at

  • email_entry_id:Outlook 郵件 EntryID
  • outlook_open_command:可複製到 PowerShell 執行的開信命令(以 EntryID 或透過主旨/時間搜尋後透過 Outlook COM 開啟郵件)

outlook_open_command 會以「主旨 + 收件時間(預設 ±1 天)」搜尋郵件;若你想降低誤判,可把 open_command_match_sender 設為 true,再加上寄件者比對。

備註:若郵件來源無法取得 EntryIDoutlook_open_command 欄位會留空。 若想回到逐筆即時寫入,可在對應 job 設定 batch_flush_enabled: false。 設定排程執行注意 excel 檔案不能開啟,否則 job 執行時無法寫入檔案而報錯。

summary_file 插件設定

enabled: true
output_file: "output/email_summaries.csv"   # 單一 CSV

CSV 欄位由程式固定,順序為: email_subject, email_sender, email_received, summary, priority, logged_at

summary_file 的 LLM 回覆格式範例(不需要 create 欄位):

{
  "action": "summary",
  "summary": "這封信主要是確認合約版本與簽署時程,對方希望於本週五前回覆。",
  "priority": "high"
}

priority 欄位可省略;若提供,建議使用 highmediumlow


同 Plugin 多 Prompt (Prompt Profiles)

同一個 plugin 可定義多組 system prompt(稱為「profile」),讓不同 Job 使用不同的 prompt 作不同的事情。

目前內建支援 Prompt Profiles 的 LLM plugins: - add_category - move_to_folder - create_appointment - event_table - summary_file

1. Plugin 設定(config/plugins/<name>.yaml

# 定義多個 prompt profiles
default_prompt_profile: general_v1

prompt_profiles:
  general_v1:
    version: 1
    description: "一般分類"
    system_prompt: |
      你是一個郵件分類助手...

  invoice_v1:
    version: 1
    description: "帳單分類"
    system_prompt: |
      你是一個帳單分類助手,優先偵測付款語意...

2. Job 設定(config/config.yaml

jobs:
  - name: "處理一般郵件"
    plugins:
      - add_category

  - name: "處理帳單"
    plugins:
      - add_category
    plugin_prompt_profiles:
      add_category: invoice_v1  # 指定使用 invoice_v1 profile

解析優先序 1. job.plugin_prompt_profiles[plugin] → 對應 profile 的 system_prompt 2. plugin.default_prompt_profile → 若 job 未指定,使用預設 profile 3. plugin.system_prompt → 完全無 profiles 時的 fallback