简体   繁体   English

通过Drive API自动执行Google表格操作(制作副本,Google App脚本,触发器)

[英]Automating Google Sheet actions (Make a copy, Google App Script, Triggers) via Drive API

Under the same account, we create client Google Sheets from a template we store within Google Drive. 在同一帐户下,我们使用存储在Google云端硬盘中的模板创建客户端Google表格。

On a regular basis, we make a take a few actions and make changes to the Sheets. 我们会定期采取一些措施并对表格进行更改。 These include: 这些包括:

  • File-Make a Copy 文件复制

  • Rename Sheet and move to the "Client" folder 重命名工作表并移动到“客户端”文件夹

  • Make small edits to a few lines in Google App Script within the Sheet 对工作表中的Google App脚本中的几行进行少量编辑

  • Setup 3 triggers with permissions to execute on change, edit etc 设置3触发器具有执行更改,编辑等权限的权限

Takes around 3-4 minutes but we do quite a few per day. 大约需要3-4分钟,但我们每天要做很多。

Can these actions be automated via Drive API or perhaps Google Cloud Functions? 是否可以通过Drive API或Google Cloud Functions自动执行这些操作? The project runs alongside AWS Lambda, so that is also an option too as we have used gspread before to work remotely with Sheets. 该项目与AWS Lambda一起运行,因此这也是一个选择,因为我们之前曾使用gspread来与Sheets进行远程协作。 But as far as I am aware making copies, triggers and app script are not available via API or other means. 但据我所知,无法通过API或其他方式来制作副本,触发器和应用程序脚本。

But as far as I am aware making copies, triggers and app script are not available via API or other means. 但据我所知,无法通过API或其他方式来制作副本,触发器和应用程序脚本。

You can do all that and more just using Apps Script. 您只需使用Apps脚本即可完成所有操作。 Read through the guides provided as part of documentation: 通读作为文档一部分提供的指南:

https://developers.google.com/apps-script/overview https://developers.google.com/apps-script/overview

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 google sheet 复制到 google drive 文件夹中 - Make a copy of google sheet into google drive folder 如何通过Google Drive API(NodeJS)上传Google Apps脚本 - How to Upload a Google Apps Script via the Google Drive API (NodeJS) 通过for循环谷歌表格脚本将行复制到另一张表格 - Copy row to another sheet via for loop google sheets script 通过API保存到Google云端硬盘 - Save to Google Drive via API 使用 Apps 脚本自动化 Google 表格中列的日期 - Automating date of a column in Google Sheet using Apps Script 使用 Google Drive API v3 中的 drive.files.copy 转换,通过 nodejs 使用 API 将 Word 文档转换为 Google 文档 - convert a Word doc into a Google doc using the API via nodejs using drive.files.copy convert in v3 of Google Drive API 使用 App 脚本将 API XML 拉入 Google 表格时出现问题 - Trouble with API pull of XML into Google Sheet with App Script 从工作表 A 复制粘贴到工作表 B 的最后一行谷歌应用程序脚本 - Copy fro Sheet A to paste in Sheet B's last row google app script 使用 Google App Script 将列从 Sheet1 复制到 Sheet2 并远程复制 - Copy columns from Sheet1 to Sheet2 & remote duplicates using Google App Script Google 工作表应用程序脚本 - 根据循环条件将数据从一张工作表复制到另一张工作表 - Google sheet app script - Copy data from one sheet to another based on condition with loop
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM