问题描述
我想知道是否有人知道如何在谷歌日历中创建活动时通知与会者.当我手动创建事件时,我可以根据需要发送事件.但是当我使用带有 javascript 客户端库的 api 创建事件时.我没有收到电子邮件通知.
I was wondering if anyone knew how to notifiy attendees upon event creation in google calendar. When I create the event manualy, I can send an event as I wish. But when I create the event using the api with the javascript client library. I do not receive email notifications.
这是我的创建代码:
var request = gapi.client.calendar.events.insert({
'calendarId': '***@***.com',
'resource': resource
});
request.execute(function() {
});
我的资源变量已定义,活动已成功添加到日历,但没有与会者收到任何邀请.如果我在创建活动后进入日历上的活动,参与者就会在那里.
My resource variable is already defined and the event is added successfuly to the calendar, but no attendees receive any invitations. And if I go into the event on the calendar after creating it, the attendees are there.
我在请求中是否遗漏了任何内容,以便与会者在创建时收到通知.
Is there anything I am missing in the request to make it so that the attendees receive notifications upon the creation.
推荐答案
参加者数组有一个 responseStatus,您可以将其设置为:"needsAction" - 与会者尚未响应邀请.拒绝" - 与会者拒绝了邀请."tentative" - 与会者暂时接受了邀请."accepted" - 与会者已接受邀请.
The attendees array has a responseStatus that you can set to:"needsAction" - The attendee has not responded to the invitation."declined" - The attendee has declined the invitation."tentative" - The attendee has tentatively accepted the invitation."accepted" - The attendee has accepted the invitation.
var request = gapi.client.calendar.events.insert({
'calendarId': '***@***.com',
'resource': resource,
'attendees': [{'email':'example@example.com','responseStatus':'needsAction'}]
}
});
request.execute(function() {
});
这篇关于Google 日历活动创建发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!