[英]How do you add google sheet cell data into an html-email using Google Scripts for Sheets?
[英]Convert google sheet to html and send as email using google app scripts
我目前正在尝试每天使用Google应用脚本通过电子邮件向Google工作表发送电子邮件,我想将工作表文档中的特定标签/工作表转换为html并填充电子邮件正文。 到目前为止,我想出了下面的代码,但不幸的是,它以pdf格式发送了电子邮件,但这不足以解决我的问题。 我感谢我能得到的所有帮助。
function sendEmailWithAttachments() {
var fileId = 'Sheet id';
// Send an email with an attachment: a file from Google Drive (as a PDF)
var file = DriveApp.getFileById(fileId);
MailApp.sendEmail('Email', 'file name',
'One File IS Attached.', {
name: 'Subject',
attachments: [file.getAs(MimeType.PDF), ]
});
MailApp.sendEmail('email2', 'file name',
'One File IS Attached.', {
name: 'subject',
attachments: [file.getAs(MimeType.PDF), ]
});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.