SKILL.md
只读
名称
recipe-save-email-attachments
描述
查找带有附件的 Gmail 邮件并将其保存到 Google Drive 文件夹。
将 Gmail 附件保存到 Google Drive
前提条件: 加载以下技能以执行此配方:
gws-gmail、gws-drive
查找带有附件的 Gmail 邮件并将其保存到 Google Drive 文件夹。
步骤
- 搜索带有附件的邮件:
gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format table - 获取邮件详情:
gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}' - 下载附件:
gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}' - 上传到 Drive 文件夹:
gws drive +upload --file ./attachment.pdf --parent FOLDER_ID






