Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/416.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用谷歌应用程序脚本在Gmail草稿中附加来自PC的文件_Javascript_Google Apps Script_Automation_Gmail_Spreadsheet - Fatal编程技术网

Javascript 使用谷歌应用程序脚本在Gmail草稿中附加来自PC的文件

Javascript 使用谷歌应用程序脚本在Gmail草稿中附加来自PC的文件,javascript,google-apps-script,automation,gmail,spreadsheet,Javascript,Google Apps Script,Automation,Gmail,Spreadsheet,目前,我正在使用谷歌应用程序脚本从电子表格中创建Gmail草稿,最后缺少的是我想直接从计算机中附加“Gmail草稿”中的文件,而不是上传G-Drive 下面是我当前的代码 在这里,我想添加一个名为“文件路径”的列,在这里我将输入需要附加在所述电子邮件中的文件路径。然后GS会自动从我的pc中选取文件,并将其附加到Gmail草稿中 提前谢谢 函数循环\u电子邮件\u草稿\u签名(){ const signature=Gmail.Users.Settings.SendAs.list(“me”).Se

目前,我正在使用谷歌应用程序脚本从电子表格中创建Gmail草稿,最后缺少的是我想直接从计算机中附加“Gmail草稿”中的文件,而不是上传G-Drive

下面是我当前的代码

在这里,我想添加一个名为“文件路径”的列,在这里我将输入需要附加在所述电子邮件中的文件路径。然后GS会自动从我的pc中选取文件,并将其附加到Gmail草稿中

提前谢谢

函数循环\u电子邮件\u草稿\u签名(){
const signature=Gmail.Users.Settings.SendAs.list(“me”).SendAs.filter(函数(account){if(account.isDefault){return true}})[0]。签名;
var ss=SpreadsheetApp.getActiveSpreadsheet();
var sheet=ss.getActiveSheet();
var指数=2;
var lastRow=sheet.getLastRow();
你看过什么索引了吗