[英]Google Calendar API sending event data to Google PubSub
I am trying to create a workflow using Google Calendar, Pub/Sub Topics, and a Subscriber.我正在尝试使用 Google 日历、Pub/Sub 主题和订阅者创建工作流。
The process would be as follows:该过程如下:
when an event is created on a particular calendar on Google Calendar, the Calendar API adds the event metadata (start date/time, end date/time, etc.) to a topic.当在 Google 日历的特定日历上创建事件时,日历 API 会将事件元数据(开始日期/时间、结束日期/时间等)添加到主题。
The Pub/Sub subscription then calls the subscriber (a Google Cloud Function) and passes the topic data Pub/Sub 订阅然后调用订阅者(Google 云函数)并传递主题数据
The Google Cloud function executes while using the data it got from the topic (calendar event info)/ Google Cloud function 在使用从主题(日历事件信息)获得的数据时执行/
Part 2 and 3 seems to be the easy bit, I am able to create a topic (which has an endpoint) and I'm able to create the subscription which will have my Cloud Function's endpoint configured to be the subscription.第 2 部分和第 3 部分似乎比较简单,我能够创建一个主题(它有一个端点)并且我能够创建订阅,它将我的 Cloud Functions 端点配置为订阅。
Part 1 is what I'm struggling to understand.第 1 部分是我难以理解的内容。 Can anyone please tell me how to configure Google Calendar so when a certain calendar gets updated with a new event, the api sends that new event's info to the topic configured to the pub/sub topic?
谁能告诉我如何配置 Google 日历,以便当某个日历更新新事件时,api 将该新事件的信息发送到配置为发布/订阅主题的主题?
Any help with this would be extremely appreciated!对此的任何帮助将不胜感激!
Many Thanks,非常感谢,
Dean院长
According to Google Calendar API you can get event updates only through http(s) webhooks.根据Google Calendar API ,您只能通过 http(s) webhooks 获取事件更新。
In your case you must have some http service that receives requests to webhook endpoint and publishes to Google PubSub channel.在您的情况下,您必须有一些 http 服务接收对 webhook 端点的请求并发布到 Google PubSub 频道。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.