GOOGLE CHAT POST IMAGE JSON SYNTAX

I'm looking to see it there is a way to have a bot/automation post a message to google chat with multiple images. I have several bots/automations that post automated "TEXT" based chats. I have yet to get one working that correctly displays multiple images. I've tried looking for "How to" or similar questions here in Q&A with no luck. I've also tried the following links:

https://developers.google.com/workspace/chat/add-text-image-card-dialog?hl=en

https://developers.google.com/workspace/chat/api/reference/rest/v1/cards#image

I can get singular images to display (in a fake way) with the following text based JSON:

{
"text":"KEY ID <<[KEY ID]>>
\nREPORTED BY: <<[REPORTED BY]>>
\n DATE: <<[DATE]>> TIME: <<[TIME]>>
\n T<<[TRACKING NUMBER]>>
\n <<[STATUS]>>
\n <<[SUPPLIER]>>
\n NOTE: <<[PURCHASE NOTE]>>
\n <<[IMAGE 1]>>
"
}

But multiple images will not display with this for example:

{
"text":"KEY ID <<[KEY ID]>>
\nREPORTED BY: <<[REPORTED BY]>>
\n DATE: <<[DATE]>> TIME: <<[TIME]>>
\n T<<[TRACKING NUMBER]>>
\n <<[STATUS]>>
\n <<[SUPPLIER]>>
\n NOTE: <<[PURCHASE NOTE]>>
\n <<[IMAGE 1]>>
\n <<[IMAGE 2]>>
\n <<[IMAGE 3]>>
\n <<[IMAGE 4]>>
\n <<[IMAGE 5]>>
"
}

Typically the first [IMAGE 1], will display. The remainder all show up as clickable links. 

Based on this info https://developers.google.com/workspace/chat/api/reference/rest/v1/cards#image I've fiddled around with trying to get this kind of magic to work:

{
"imageUrl": string,
"onClick": {
object (OnClick)
},
"altText": string
}

With no success. Really I've been mashing my head into this brick wall for a little too long at this point, any of you folks with more experience than me have any solutions?  Or is this just not something that can be done?

0 0 629
0 REPLIES 0