我正在创建G-Suite附加组件,以将第三部分会议解决方案与Google日历活动集成在一起。我将选择的第三方会议解决方案添加到清单文件中:
{
"timeZone": "America/Denver",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Calendar",
"serviceId": "calendar",
"version": "v3"
}]
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/admin.directory.user.readonly",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.addons.execute",
"https://www.googleapis.com/auth/calendar.addons.current.event.read",
"https://www.googleapis.com/auth/calendar.addons.current.event.write"
],
"urlFetchWhitelist": [],
"runtimeVersion": "V8",
"addOns": {
"common": {
"name": "Conference Solution",
"logoUrl": "https://imagesite.com/companyLogo",
"layoutProperties": {
"primaryColor": "#4285f4",
"secondaryColor": "#ea4335"
},
"homepageTrigger": {
"runFunction": "onHomePage"
}
},
"calendar": {
"homepageTrigger": {
"runFunction": "onHomePage"
},
"eventOpenTrigger": {
"runFunction": "onCalendarEventOpen"
},
"eventUpdateTrigger": {
"runFunction": "calendarUpdated"
},
"currentEventAccess": "READ_WRITE",
"conferenceSolution": [{
"onCreateFunction": "createConference",
"id": "123",
"name": "Meeting Conference Solution",
"logoUrl": "https://someUrl.com/conferenceSolutionLogo.jpg"
}]
}
但是,当我选择第三部分会议解决方案时,会收到500个无法创建会议的响应和错误代码。
UPD。响应正文:
[13,"Internal error encountered."]
请求网址:
https://calendar-pa.clients6.google.com/v1/calendar/[email protected]/event/2lhlppothipf43ggb9krfabcef/conferencing?alt=protojson&key=AIzaSyAJV0pH9dpVwdNZeLajIGsIpjcPu3tVgAE
请求正文:
[
[
"[email protected]",
"2lhlppothipf43ggb9krfabcef"
],
null,
null,
[
4,
[
null,
"AKfycbzrJeytVGp3C8hhST2QMETrVdaXPG84CNnIXRQtwJUv",
"1"
]
]
]
createConference函数:
function createConference(e) {
var dataBuilder = ConferenceDataService.newConferenceDataBuilder();
var confParams = dataBuilder.newConferenceParameter()
.setKey('conferenceId')
.setValue('addOn');
confParams.setKey("key")
.setValue(JSON.stringify({
type: "addOn"
}));
dataBuilder.setConferenceSolutionId("123");
dataBuilder.setParameters(confParams);
return dataBuilder.build();
}
充分了解您的情况后,我复制了您的代码,您所描述的行为似乎是意外的行为。设置了附加组件以通过第三方会议解决方案创建会议并从下拉列表中选择它之后:
会议无法运行,并且在Stackdriver日志中可以看到以下错误:
ReferenceError: ConferenceDataService is not defined.
我进行了搜索,似乎Google的Issue Tracker上已经有一份报告,其中详细介绍了相同的行为:
Google似乎确实了解此问题,但是您可以单击上述页面左上方问题编号旁边的☆,让Google知道更多人正在遇到此问题,因此更有可能看到更快的速度。
希望对您有帮助!
似乎上述Issue Tracker链接上留下的评论已在Google端解决了这一问题。为了确认我在Apps脚本界面中检查了该方法,现在正在填充低标准方法建议: