我正在处理一个脚本,该脚本从分配给特定标签的已接收电子邮件地址中提取Gmail附件,并将附件移动到Google云端硬盘中的特定文件夹,现在问题是当我收到来自同一电子邮件主题的同一发件人的电子邮件时保存在不同标签中的脚本忽略了将附件移动到Google云端硬盘中的不同文件夹,因为Google将与主题相同的主题的电子邮件分组,但当我关闭Gmail中的会话视图时,脚本可以正常工作。有没有办法围绕这个或谷歌应用程序脚本中的功能打开和关闭对话视图?例如:
{ // subject1 >>
"filter": "from:no-reply@test1.com", // Email to extract attachments from
"folder": "folder1/Belasting/20000/Berario/", // Folder to send attachments to in Gdrive
"filenameTo": "'%s' ~ yyyy MM dd", // format of renaming files if {RenameFile is set to true}
"Renamefile": false, // Turn renaming of files on and off
"globalFilter": "has:attachment in:label1-coj-berario -in:trash -in:drafts -in:spam", // Labels to fetch attachments from in Gmail
"markUsRead": false,
"newerThan": "1m", // how far back to fetch attachments
"archive": true // Turn achiving on and off
},
{ // subject1
"filter": "from:no-reply@test1.com", // Email to extract attachments from
"folder": "folder1/Belasting/20000/Tan", // Folder to send attachments to in Gdrive
"filenameTo": "'%s' ~ yyyy MM dd", // format of renaming files if {RenameFile is set to true}
"Renamefile": false, // Turn renaming of files on and off
"globalFilter": "has:attachment in:label2-coj-berenice-tan -in:trash -in:drafts -in:spam", // Labels to fetch attachments from in Gmail
"markUsRead": false,
"newerThan": "1m", // how far back to fetch attachments
"archive": true // Turn achiving on and off
},
电子邮件具有相同主题的不同标签和文件夹,但由于电子邮件具有相同的主题并在对话视图中分组,脚本会提取附件并将其保存在同一文件夹中