recipe-save-email-attachments

recipe-save-email-attachments

热门

查找带有附件的 Gmail 邮件并将其保存到 Google Drive 文件夹。

2.7万Star
1669Fork
更新于 2026/3/31
SKILL.md
只读
名称
recipe-save-email-attachments
描述

查找带有附件的 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