recipe-save-email-attachments
作者: Google
尋找帶有附件的 Gmail 郵件,並將其儲存到 Google Drive 資料夾中。
npx skills add https://github.com/googleworkspace/cli --skill recipe-save-email-attachmentsSave Gmail Attachments to Google Drive
PREREQUISITE: Load the following skills to execute this recipe:
gws-gmail,gws-drive
Find Gmail messages with attachments and save them to a Google Drive folder.
Steps
- Search for emails with attachments:
gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:[email protected]"}' --format table - Get message details:
gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}' - Download attachment:
gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}' - Upload to Drive folder:
gws drive +upload --file ./attachment.pdf --parent FOLDER_ID
來自 Google 的更多技能
gws-modelarmor-sanitize-response
Google
Google Model Armor:透過 Model Armor 模板淨化模型回應。
gws-people
Google
管理聯絡人與個人資料。
gws-shared
Google
gws CLI:用於認證、全域旗標與輸出格式化的共享模式。
gws-sheets
Google
Google Sheets:讀取和寫入試算表。
gws-sheets-append
Google
Google Sheets:將一行資料附加到試算表中。
gws-sheets-read
Google
從試算表中讀取值。
gws-slides
Google
Google Slides:讀取與撰寫簡報。
gws-tasks
Google
Google Tasks:管理任務清單與任務。