【问题标题】:Why are attendees not added to events via Google Calendar API?为什么没有通过 Google Calendar API 将与会者添加到活动中?
【发布时间】:2019-07-22 15:02:53
【问题描述】:

使用 Google 服务帐号将全天活动添加到日历中。创建活动工作正常,但没有添加参与者。代码很简单,所以我错过了什么?

(下面代码中的'attrs'是从其他地方拉进来的,并且工作正常。)

        body = {
            'summary': attrs['title'],
            'description': "Test Event"
            'start': {
                'date': attrs['due_date'],
            },
            'end': {
                'date': attrs['due_date'],
            },         
            'transparency': 'transparent',
            'attendees': [
                {'email': 'test@example.com'}
            ],  
        }

        event = service.events().insert(
            calendarId=calId,
            body=body
        ).execute()
        logger.info("New event %s created." % event['id'])

【问题讨论】:

  • 是因为您的与会者没有接受邀请吗?您是否检查过他们是否有任何电子邮件邀请他们参加活动?
  • 很遗憾,他们没有收到邀请。

标签: python google-calendar-api


【解决方案1】:

insert() 参数中也添加sendNotifications=True,

【讨论】:

  • 谢谢,但这并没有改变任何事情。
猜你喜欢
  • 2021-05-22
  • 1970-01-01
  • 2014-10-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-17
  • 2020-07-09
相关资源
最近更新 更多