简体   繁体   English

Google 日历 API 将事件数据发送到 Google PubSub

[英]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:该过程如下:

  1. 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 会将事件元数据(开始日期/时间、结束日期/时间等)添加到主题。

  2. The Pub/Sub subscription then calls the subscriber (a Google Cloud Function) and passes the topic data Pub/Sub 订阅然后调用订阅者(Google 云函数)并传递主题数据

  3. 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.

相关问题 com.google.cloud.pubsub.spi.v1.Publisher.publish 未向 PubSub 发送数据 - com.google.cloud.pubsub.spi.v1.Publisher.publish is not sending data to PubSub Google PubSub 和订购信息 - Google PubSub and ordering messages 带有 PubSub 的 GKE 上的 Google Healthcare API - INVALID_ARGUMENT - Google Healthcare API on GKE with PubSub - INVALID_ARGUMENT Google PubSub 到 Kafka 源连接器 - Google PubSub to Kafka Source connector 如何从 google Analytics Api 获取记录的每个事件的数据? - how to get from google Analytics Api data for each event recorded? 如何将数据从 Google PubSub 主题流式传输到 PySpark(在 Google Cloud 上) - How can I stream data from a Google PubSub topic into PySpark (on Google Cloud) 节点JS | 谷歌视觉 API | 将 base64 发送到 Google Cloud Vision 时出现“错误的图像数据” - Node JS | Google Vision API | "Bad image data" when sending base64 to Google Cloud Vision Google 的 PubSub 和 PubSub Lite 需要不同的 java 客户端库吗? - Different java client libraries for Google's PubSub and PubSub Lite needed? Google Cloud Spanner 通过 Cloud Data Fusion 或其他方式实时更改数据捕获到 PubSub/Kafka - Google Cloud Spanner real time Change Data Capture to PubSub/Kafka through Cloud Data Fusion or Others 在哪里可以找到 nodejs google pubsub 库的常量? - Where to find constants for nodejs google pubsub libraries?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM