How to access or call “Send this form to others”?

后端 未结 2 582
别那么骄傲
别那么骄傲 2020-12-09 23:44

I have a form attached to a Google Apps spreadsheet. It\'s a form to let my coworkers submit agenda items to our weekly review meeting. I\'m writing a script to automaticall

2条回答
  •  借酒劲吻你
    2020-12-10 00:29

    Joris, you're right. You can use the method fetch() to send the form's html to the user's mailbox:

    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,
      });
    ...
    

提交回复
热议问题