我必须向某些人发送表单,然后使用Google脚本执行此操作.我尝试使用以下代码将表单嵌入到电子邮件中: https://stackoverflow.com/a/23671529/4305236:
var form = FormApp.create('New Form');
....
var url = form.getPublishedUrl();
var response = UrlFetchApp.fetch(url);
var htmlBody = HtmlService.createHtmlOutput(response).getContent();
MailApp.sendEmail({
to: email,
subject: subject,
htmlBody: htmlBody,
});
...
Run Code Online (Sandbox Code Playgroud)
但是,当表单直接从谷歌表单界面发送时,它不像谷歌那样发送表单.
最后,目标是每天更改表单,因此无法在先前发送的电子邮件中使用模板.
提前感谢您的任何帮助.