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 从公开仓库中收录这些内容。

举报或申请下架