--- title: "Google Chat Connector" slug: "google-chat-connector" updated: 2024-03-26T16:44:17Z published: 2024-03-26T16:44:17Z canonical: "support.tulip.co/google-chat-connector" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # 谷歌聊天连接器 *利用谷歌聊天连接器简化警报和消息传递*-- 由 Bow&Stern 构建 ## 目的 谷歌聊天连接器可通过谷歌聊天主动向 Tulip 以外的其他团队发出警报和信息。 ## 联系 Bow & Stern 如需 Bow & Stern(连接器的构建者)提供的更多信息,请随时通过以下方式联系我们:Info@Bownsternps.com ## 设置说明 第一步是创建一个项目并配置凭证。您可以按照本指南设置 Google Chat API(只需记住使用/添加 Google Chat 应用程序,而不是 Google Drive 应用程序,并使用下面提供的 Chat API 连接详情)- https://support.tulip.co/docs/google-drive-connector **您还需要订阅付费的 Google 工作区,才能访问 Chat API,并创建活动空间来发送和接收消息。 **![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28499%29.png) ### 郁金香连接详细信息 需要在 Tulip 连接器上配置以下信息。 运行于:云连接器主机 Host: WWW.chat.googleapis.com 端口:443 TLS:是 需要在连接器中配置的作用域: https://www.googleapis.com/auth/chat.messages.create https://www.googleapis.com/auth/chat.spaces.readonly https://www.googleapis.com/auth/chat.memberships https://www.googleapis.com/auth/chat.messages ### 身份验证和标头 Auth Code URL - https://accounts.google.com/o/oauth2/v2/auth Access Token URL - https://oauth2.googleapis.com/token Client ID -*在云控制台的 API 凭据部分找到。请参阅上面链接的指南,了解在哪里可以找到它。* ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28500%29.png) ### 连接器功能 - GET - 列出调用者所属的所有空间 - 目的:此连接器将获取调用者所属空间的列表。 - 端点:METHOD HTTP GET 调用端点 - https://chat.googleapis.com:443/v1/spaces - 所需输入:无需输入 - 所需输出提取器:不需要输出,但建议使用以下输出: - 名称 - 类型 - 显示名称 - spaceThreadingState - 空间类型 - GET - 列出空间内发送的所有信息 - 方法:HTTP GET 调用端点*https://chat.googleapis.com:443/v1/spaces/SPACEID/messages*,用空间 ID 替换*SPACEID*。 - 目的:此连接器将获取空间聊天频道中的消息列表。 - 所需输入:SpaceID - 谷歌空间的 ID,可在访问该空间时在 URL 中找到,位于 /space/ 后。 - 例如 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28501%29.png) - 这里的空间 ID 将是 AAAAfegPaUH,端点调用将如下所示: https://chat.googleapis.com:443/v1/spaces/AAAAfegPaUH /messages - 所需的输出提取器:不*需要*输出,但建议使用以下输出: - 名称 - 发送者名称 - 发送者类型 - 创建时间 - 文本 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28502%29.png) - POST - 向空间发送信息 - 方法: HTTP POST 调用端点*https://chat.googleapis.com:443/v1/spaces/SPACEID/messages*,用空间 ID 替换*SPACEID*。 - 目的: 该连接器将向用户定义的空间发送信息。 - 所需输入:SpaceID - 谷歌空间的 ID,可在访问空间时在 URL 中找到,位于 /space/ - 之后。 - 举例说明: 此处的空间 ID 将是 AAAAfegPaUH,端点调用将如下所示: https://chat.googleapis.com:443/v1/spaces/AAAAfegPaUH /messages - MessageText - 发送到空间的信息文本 - 所需的输出提取器:*无需*输出,但建议使用以下输出 - 文本 - 创建时间 - space.Name ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28503%29.png)