0

I need to create a solution for my company where we need to be able to send a DM from an existing application to an organization member google chat.

Ideally we would make a POST to an google chat API providing the user email or phone number (data we already own) to send the message, or make a request to an API where we could provide the email or phone number and retrieve the incoming webhook url for that user and then use that to send the message.

All answers I've read so far point to a user initiated process, such as interacting with a bot, which usually have low adoption.

Is there another way to achieve a low friction solution?

Thanks a lot!

Tomaz Fernandes
  • 2,429
  • 2
  • 14
  • 18

1 Answers1

0

All messages to Google Chat from third-party applications are passed through incoming webhooks, which are contained within bots. Bots can be configured in a group chat in such a way that there is no need for user interaction. And then you can use the REST API in your external application to create the message to the configured bot, and the bot will automatically forward the message to Google Chat.

enter image description here

More material can be found here:

Using Incoming Webhooks

Connect to External Webapps

CMB
  • 4,950
  • 1
  • 4
  • 16
  • Thanks Carlos, those are useful links. Can you elaborate on this "Bots can be configured in a group chat in such a way that there is no need for user interaction." please? – Tomaz Fernandes Dec 29 '20 at 21:55
  • It means that there is no need for a Google Chat user to type a message for the bot to respond. An external application can do a POST request to the bot instead. https://developers.google.com/hangouts/chat/quickstart/incoming-bot-node – CMB Dec 29 '20 at 22:02
  • I see... In this approach the user has to create the webhook and provide a space, which I think adds more friction. We're thinking of using the ADDED_TO_SPACE event to gather and persist the user's email and the space id when he adds the bot. And then the 3p app will POST a message providing the email, and we send the message to the corresponding space. How does that sound? – Tomaz Fernandes Dec 29 '20 at 22:33