function setDocumentAsReady(documentStr) {
try {
console.log(`setDocumentAsReady received request: ${documentStr}`);
const documentObj = JSON.parse(documentStr);
console.log(`Setting document ${documentObj.name} with url ${documentObj.url} as Ready`)
const scriptProperties = PropertiesService.getScriptProperties();
scriptProperties.setProperty(documentObj.url, 'Ready');
} catch (err) {
console.log(`Failed with error ${err.message}`)
}
}
I suspect there is something wrong in setDocumentAsReady(), so I tried adding in console.log(
setDocumentAsReady received request: ${documentStr}
);它给了我:setDocumentasready收到的请求:未定义,因此这意味着前端没有记录需要更新的文件
I also tried clicking "yes" in modal to update file status, then rerunning the script, but spreadsheet still isn't updated.
From the question
i want to do so by letting user click a modal sent through gmail that confirm the file's status will be changed
It's impossible to send a modal through Gmail because JavaScript will be cut off.