recipe-save-email-attachments

recipe-save-email-attachments

熱門

尋找 Gmail 中含有附件的郵件,並將其儲存到 Google Drive 資料夾。

2.7萬星標
1669分支
更新於 2026/3/31
SKILL.md
readonlyread-only
name
recipe-save-email-attachments
description

尋找 Gmail 中含有附件的郵件,並將其儲存到 Google Drive 資料夾。

將 Gmail 附件儲存到 Google Drive

前置條件: 載入以下技能以執行此配方:gws-gmailgws-drive

尋找 Gmail 中含有附件的郵件,並將其儲存到 Google Drive 資料夾。

步驟

  1. 搜尋含有附件的郵件:gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format table
  2. 取得郵件詳細資訊:gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}'
  3. 下載附件:gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'
  4. 上傳到 Drive 資料夾:gws drive +upload --file ./attachment.pdf --parent FOLDER_ID