【问题标题】:Google Apps Script: How to handle responses of a Form that was dynamically?Google Apps 脚本:如何处理动态表单的响应?
【发布时间】:2019-10-03 05:02:03
【问题描述】:

我编写了一个简单的 Apps 脚本,它执行以下操作:

  • 创建一个 Google 表单,并通过验证相应地填充其字段。
  • 创建一个文件夹并将其上传到 Google Drive。
  • 创建一个电子表格文件并将其上传到上面创建的文件夹中。

我现在要做的是使用脚本处理 Google 表单提交以发送电子邮件响应。每次使用上述脚本创建表单时,我如何处理 Google 表单提交,而无需手动附加另一个脚本。

【问题讨论】:

    标签: google-apps-script google-forms


    【解决方案1】:

    您可能想使用 onFormSubmit 触发器。 指定将响应提交到表单时触发的触发器。

    var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
    ScriptApp.newTrigger('myFunction')
      .forForm(form)
      .onFormSubmit()
      .create();
    

    阅读官方文档here

    【讨论】:

      猜你喜欢
      • 2022-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多