Recipe Email Drive Link

作者 googleworkspacea3768d0e82ad無授權條款31K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

Share a Google Drive file and email the link with a message to recipients.

AI 產生的概覽

使用 gws 指令共用 Google Drive 檔案,並以電子郵件將連結寄給收件者。

功能
這個配方說明如何共用 Google Drive 檔案,並以電子郵件寄送其連結。它使用 gws 命令列工具依名稱尋找檔案、為收件者電子郵件建立 reader 權限,並寄出包含文件連結的 Gmail 郵件。產出是已共用的檔案以及已寄出的郵件通知。
適用情境
當需要將 Drive 檔案共用給他人,並以電子郵件寄送連結時使用。它適合簡單的一次性共用與通知工作,而非批次或複雜的權限流程。
執行需求
需要 gws 命令列工具,並載入 gws-drive 與 gws-gmail 技能,同時具備對 Google Drive 和 Gmail 的已驗證存取權。它不附帶指令碼,僅為操作說明。

Email a Google Drive File Link

PREREQUISITE: Load the following skills to execute this recipe: gws-drive, gws-gmail

Share a Google Drive file and email the link with a message to recipients.

Steps

  1. Find the file: gws drive files list --params '{"q": "name = '\''Quarterly Report'\''"}'
  2. Share the file: gws drive permissions create --params '{"fileId": "FILE_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "[email protected]"}'
  3. Email the link: gws gmail +send --to [email protected] --subject 'Quarterly Report' --body 'Hi, please find the report here: https://docs.google.com/document/d/FILE_ID'

來源與署名

來源:googleworkspace/cli位於skills/recipe-email-drive-link提交a3768d0

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架