You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Cloud Functions(第二代)部署的Google Chat应用回复失败问题求助

Cloud Functions(第二代)部署的Google Chat应用回复失败问题求助

我现在用Python在Cloud Functions(第二代)上搭一个超简单的Google Chat应用,需求特别简单——就是在mail.google.com/chat发消息的时候,应用能回复一句"OK"就行。但现在每次发消息,日志里都会弹出错误,完全没法正常回复,折腾好半天都没搞定,来求助各位大佬!

遇到的错误信息:

Can't post a reply. The Chat app didn't respond or its response was invalid. If your Chat app is configured as an add-on, see "Build Google Chat interfaces" in the Google Workspace add-ons documentation. Otherwise, see "Receive and respond to Google Chat events" in the Chat API documentation.

我的代码实现:

import functions_framework

@functions_framework.http
def mi_app_de_chat(request):
    event = request.get_json(silent=True)
    if event and event.get("type") == "ADDED_TO_SPACE":
        return {"text": "Your Welcome"}
    return {"text": "OK"}

我感觉逻辑上没什么毛病啊,有没有大佬能帮我排查下问题出在哪?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.07 06:53:12