Google Hangouts Chat Integration Overview

Applies to

Bridge by Smartsheet

With the Google Hangouts Chat integration, you can create chat bots to interact with people in Google Hangouts Chat.

You will need to enable the Hangouts Chat API and obtain credentials to use the API to set up this integration. 

Enable hangouts chat API and obtain credentials

  1. Either select or create a project on Google Cloud Platform, then enable the API.
  2. Once enabled, click Credentials in the left-hand menu.
  3. Click Create Credentials and select Service account key.
  4. Give the service account a name and the role Owner (Project > Owner)
  5. Select JSON for the key type.
  6. Click Create.

The private key will be downloaded. The ID of this private key will also appear in APIs & Services > Credentials. 

This is the only copy of the key.

Register the integration and configure the bot

Register the Bot:

  1. In Bridge, open the registration window for the integration from the Extensions section.
  2. In the settings tab, paste the contents of the private key JSON file into the field labeled Service Account JSON.
  3. Click Register.
  4. The Bot URL field will now be filled. Copy this URL.

Google Hangouts Chat Integration

Configure the bot:

  1. Give your bot a name and an image.
  2. Set Description to Bridge Chat Bot (or something similar).
  3. Check both boxes under Functionality.
  4. Select Bot URL under Connection settings.
  5. Paste in the copied URL.
  6. Specify who can call this bot.
  7. Click Save.

Use the bot

You will need to create a workflow for the bot to run. Follow the steps below to create a very simple workflow that responds Pong when you say Ping.

  1. Create a new workflow in Bridge called PingPong.
  2. Click on startstate and type Pong in the answer field.
  3. Click on the trigger element and expand the section Phrases in the panel. Add Ping as a phrase.
  4. Save the workflow.

In Google Hangouts Chat, send the Bridge bot the message Ping and the bot should respond back with Pong.

Google Hangouts test workflow

Space events

A space event is what happens when the bot is added to, or removed from, a space in Google Hangouts Chat. You can use each of these two events to trigger separate workflows, or trigger the same workflow with different state values.


Added To Space

A good use of the Added To Space event would be to trigger a workflow that will send a message to the space detailing what commands the bot can recognize.

Removed From Space

It's important to remember that a workflow triggered by the Removed From Space event will not be able to send a message to the space.