目标
我正在构建谷歌日历,修改对Google事件的描述。
问题
我不知道如何编辑事件描述。我按照这教程开始构建AddOn。
我还找到了这文档,这些文档显示了如何编辑与会者,但我还没有找到如何从AddOn中编辑事件描述。
新增信息
目标的视觉表达

来自eventUpdateTrigger的输出
下面的对象显示,eventId不是给eventUpdateTrigger回调的
"hostApp": "calendar",
"commonEventObject": {
"platform": "WEB",
"hostApp": "CALENDAR"
},
"calendar": {
"organizer": {
"email": "<email>"
},
"capabilities": {
"canSetConferenceData": true,
"canAddAttendees": true,
"canSeeConferenceData": true,
"canSeeAttendees": true
},
"calendarId": "jamesdouitsis@gmail.com",
"id": "<id>"
},
"clientPlatform": "web"
}发布于 2022-04-25 02:10:49
使用setDescription和setTitle有什么问题
function saveDescriptionAndTitle(obj) {
let cal = CalendarApp.getCalendarById(obj.calid);
let ev = cal.getEventById(obj.evid);
ev.setTitle(obj.title);
ev.setDescription(obj.desc);
}发布于 2022-04-25 05:32:55
为此,您需要调用google -没有API就无法直接更新事件描述。
API参考文献- https://developers.google.com/calendar/api/v3/reference/events/update
在AppScript中,您可以使用一个类来调用API,这可能对您有所帮助。
https://stackoverflow.com/questions/71993673
复制相似问题