我第一次使用Google Apps腳本,並試圖以編程方式簡單更新我在Gmail中的休假回覆,作爲Google Apps腳本的第一項測試。如何使用Google Apps腳本以編程方式更新電子郵件假期回覆?
我在這裏以下文件:https://developers.google.com/gmail/api/v1/reference/users/settings/updateVacation
而且我已經寫了:
function updateAutoResponse(){
Gmail.Users.Settings.updateVacation('me', {
"enableAutoReply": true,
"responseSubject": "I am not here...",
"responseBodyPlainText": "I am not here...",
"responseBodyHtml": "I am not here...",
"restrictToContacts": false,
"restrictToDomain": false
});
}
不幸的是,我得到一個錯誤,它似乎編譯後。解析錯誤(第65行,文件「代碼」)
我已經在高級Google服務以及Google API控制檯中啓用了Gmail API,所以我認爲這是某處的語法問題。
任何想法都會超級有用。謝謝!
非常感謝!這工作! – dunkhippo33