Using Google App Script to update spreadsheet from gmail, javascript not running

问题描述 投票:0回答:1
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
javascript html google-sheets google-apps-script
1个回答
0
投票

It's impossible to send a modal through Gmail because JavaScript will be cut off.

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.