2

I'm stuck these days with a google chat API and I try to make my bot look like the cool ones so I add the card feature. But I'm experiencing this problem I can't mention a user. in my old bot (before adding the card) I had this JSON

"text":" hello there my friend"

and I always got a response that says

@Theodosis hello there my friend

but now that I switched to the card I can't mention a user now I have this JSON

{
  "cards" : [ {
    "sections" : [ {
      "widgets" : [ {
        "textParagraph" : {
          "text" : "<users/USER_ID> hello there my friend"
        }
      }, {
        "buttons" : [ {
          "textButton" : {
            "onClick" : {
              "openLink" : {
                "url" : "some Method"
              }
            },
            "text" : "this is a button"
          }
        } ]
      } ]
    } ]
  } ],
  "thread" : {
    "name" : "a link here"
  }
}

and my response is

hello there my friend

it completely ignores everything in inside this <> I have also tried to do an HTML hack and removed this with <users/USER_ID> but that didn't work as well I get a response like this

hello there my friend

but I expect this

@Theodosis hello there my friend

and I can't seem to find any solution on the internet

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Theodosis
  • 792
  • 2
  • 7
  • 22

0 Answers0