Search code examples
messaginggoogle-hangoutsgoogle-chatgoogle-chat-api

What is the limit of Google Chat message card via chatbot


I am trying to create poll system that use message as the database like codelabs.

Since the database is just a chat message, after there are a lot of data, the message is not updated. They called my endpoint successfully but the message is not updated. Maybe there is limit of the response, message, or what?

Based on character limit,I think 4096 Characters is the limit of text message. But what is the limit of card message? Is it based on payload size? or text in the card? or what?

I successfully updated message using more than 35000 characters in the card message(json). But after about 40000 characters the message is failed to updated.

By the way, currently I only tested using update message web hook. So I don't know the the error message, is there is error log for webhook? I will try using rest POST later, but currently I finding out the limit information from trusted source especially google itself.


Solution

  • I contacted Google support and provided them with examples of payloads that were both working and not working, each exceeding 35KB in size. In response, they provided me with a message containing only 4000 characters.

    Although I believe I provided sufficient details about my question, it's possible that Google support did not fully understand the context of my situation.

    But recently I see in message docs they updated the detail:

    Cards are usually displayed below the text body of a Chat message, but can situationally appear other places, such as dialogs. Each card can have a maximum size of 32 KB.

    So the official docs said 32 KB, but in reality, sometimes I can send more than 35KB card messages.

    I researched it, and it seems depend on card attribute that I used. But I am still not sure how they actually count it.