Google Chat

Getting started with Google Hangouts Chat

IMPORTANT: The above modules integrate with Google Hangouts Chat, Google's messaging platform for teams (G Suite users). They DO NOT work with Google Hangouts, which is a messaging platform available to all Google users.

To use any of these modules, you need to have a G Suite account with administrator rights, or ask your account administrator to help set up the connection between Google Hangouts Chat and Integromat. If you do not have a G Suite account yet, you can create one at gsuite.google.com. The Google Chat API needs to be enabled in the Admin Console, as follows. First, click on the Enable APIs and Services link.

In the Search bar, type Google Chat API and click on the result.

On the next screen, click the Enable button. Integromat can now be connected as a Google Chat bot.

Integrating the Google Hangouts Chat service with Integromat

For 3rd party service integration with Hangouts Chat, Google uses the concept of chat bots. A chat bot acts like a regular participant in chat rooms or direct messages, even though, behind the scenes, it is implemented as a remote web service or a Google Apps Script project. There are only two requirements for integrating your Integromat scenario with Hangouts Chat: first, you need to provide a URL to which Google will forward chat messages (and events such as "Added to Chat Room"), and second, the calculation of the response inside a scenario must take less that 30 seconds. For the first requirement, create a new Integromat scenario and insert Google Hangouts Chat > Chat Listener. Clicking on the module will let you create a new webhook (just give it a name and click Save), which will provide a dedicated URL that can be used to receive chat messages from Google.

Copy this URL by clicking the Copy address to clipboard button. Then, go to your G Suite Admin Console, select the Hangouts Chat API in the Enabled APIs and services section, and open its Configuration tab. Here you can give your Bot a name, choose if it will be available only in direct messages, chat rooms, or both, and finally, fill in its Bot URL from Integromat.

Now that Google knows where to send your messages, you can start building a response inside your Integromat scenario (just keep in mind that it needs to reach Google in less than 30 seconds). Sending a response is as simple as inserting a Chat Response module in the scenario's data flow. Below is an example scenario which uses filters to send a different response based on if the incoming message was a notification that your Bot was added to a chat room, or if it was an actual text message.

The conversation with the Bot (in this case, named "integromatdev") will look similar to the following:

Sending one-off messages to a Hangouts Chat Room

Integromat can also send one-off messages (not expecting a response) to any Hangouts Chat chat room that has a webhook URL associated with it. To create a chat room webhook in Hangouts Chat, click on the arrow next to the number of chat room participants to display the dropdown menu, and then select Configure webhooks.

In the pop-up window, click on Add Webhook, then give the webhook a name, and click Save. Copy the generated URL.

In Integromat, use the Inject Message Into Room module, which enables you to create a new connection, and use the chat room URL generated in the previous step as the destination.

After running the scenario, the message should appear in the Hangouts Chat chat room.

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.