Google Chat App on Cloud Functions (2nd gen) – response fails
09:15 20 Aug 2025

I’m building a very simple Google Chat App on Cloud Functions (2nd gen) (Python). The app should just reply "OK" when I send a message from mail.google.com/chat.

But in the logging error area always returns this error:

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" (https://developers.google.com/workspace/add-ons/chat/build) in the Google Workspace add-ons documentation. Otherwise, see "Receive and respond to Google Chat events" (https://developers.google.com/chat/api/guides/message-formats) in the Chat API documentation."

Python app

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"}

python google-cloud-functions google-cloud-run google-chat