Search code examples
google-hangoutshangouts-api

Make Hangouts Chat bot response visible only to sender user in room


I want to build a bot in which the invoking user first need to select an option from the first Bot response and therefore the selected option does post it to the room.

A simple example to explain the use case:

User "Mr.X" is in room "RoomX".

Mr.X sends the following message to the room "@MyBot greet".

MyBot bot responds with an interactive card saying (this card is only visible to Mr.X):

"Select the type of greet you'll would like to use:"
Kind greet
Rude greet

Mr.X clicks "Kind greet" option in the interactive card.

MyBot sends the following message to RoomX (visible to all in the room):
"Greeting everyone, I hope you have a good day!"

I have a little experience with Slack bots and it was possible to specify that a bot response could be visible only to the caller.

Is there some similar approach to achieve this use case in Hangouts Chat besides "responding" the private part in a DM to the user?


Solution

  • It's not currently possible to hide messages from users in a room or for only a certain user to see them. As you suggest, your best solution is to prompt the user via DM.