SuperAPI AI 工具集

recipe-email-drive-link

办公与效率

查看项目

更新于 10-16 07:20

技能介绍

用途:这是一个 Google Workspace CLI 配方(recipe),用于把 Google Drive 文件分享给指定收件人,并将文件链接通过 Gmail 邮件发送出去。

前提:需先加载 gws-drive 与 gws-gmail 两个技能。

主要步骤:

  1. 查找文件:gws drive files list --params '{"q": "name = '''Quarterly Report'''"}'
  2. 共享文件:gws drive permissions create --params '{"fileId": "FILE_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "client@example.com"}'
  3. 发送链接:gws gmail +send --to client@example.com --subject 'Quarterly Report' --body 'Hi, please find the report here: https://docs.google.com/document/d/FILE_ID'

使用方式:按上述顺序依次执行命令,把示例中的文件名、FILE_ID、收件人地址和邮件内容替换为实际值。

适用场景:需要把 Drive 文件以只读权限共享给外部或内部收件人,并附上链接说明的自动化流程。

限制:资料未说明所需权限范围、配额、失败处理、是否支持批量或多个收件人、是否支持除 reader 之外的角色;价格、平台支持等亦暂未提供。