如何通过Google Apps Script for Calendar向其发送邀请 [英] How can I send an invitation to the guest by Google Apps Script for Calendar

查看:422
本文介绍了如何通过Google Apps Script for Calendar向其发送邀请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Google Apps脚本将访客添加到日历活动,并在脚本添加访客后立即发送邀请。
但我无法找到一种方法向访客发送电子邮件邀请。

  var events = calendar.getEvents(start_date,end_date)
event.addGuest('guest_email@gmail.com' );

有什么方法可以从Apps Script发送邀请给客人?

我使用高级Google服务重写了这个内容,但我添加的客户仍然收不到邀请电子邮件。

  var body = {
'sendNotification':true,
'参加者':出席者
};

var ret = Calendar.Events.patch(body,calendarId,eventId);


解决方案

例如,您可以使用高级Google服务中的日历:

  var event = Calendar.Events.get(calendarId,eventId); 
Calendar.Events.patch(event,calendarId,eventId,{sendNotifications:true});

设置发送通知为真

请参阅高级Google服务中的日历的相关文档。


I am trying to add a guest to a Calendar event by Google Apps Script and to send an invitation as soon as my script add a guest. But I can't find a method to send an email invitation to the guest.

var events = calendar.getEvents(start_date, end_date)
event.addGuest('guest_email@gmail.com');

Is there any way to send an invitation to the guest from Apps Script?

I rewrote with Advanced Google Services but still the guest I have added can't get invitation email.

var body = {
  'sendNotification': true,
  'attendees': attendees
};

var ret = Calendar.Events.patch(body, calendarId, eventId);

解决方案

You can with Calendar in Advanced Google Services, for example:

var event = Calendar.Events.get(calendarId, eventId);
Calendar.Events.patch(event, calendarId, eventId, {sendNotifications: true});

Sets the sending of notifications to true

See the documentation on Calendar in the Advanced Google Services.

这篇关于如何通过Google Apps Script for Calendar向其发送邀请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆