Skip to main content

Google Chat Config

Integrate ServiceOps with Google Chat to enable a conversational virtual agent and deliver real-time notifications directly to your users.

This guide provides step-by-step instructions for integrating Motadata ServiceOps with Google Chat. This integration allows your users to interact with a ServiceOps virtual agent and receive real-time notifications directly within their Google Chat conversations, streamlining support and communication. This document is intended for IT Administrators responsible for configuring both Google Workspace and ServiceOps.

Prerequisites

Before you begin the integration, ensure you have the following:

  • A Google Workspace account with a "Business" or "Enterprise" plan.
  • An account with administrator privileges for both the Google Admin console and the associated Google Cloud project.
  • Your Motadata ServiceOps base URL. You can get this from Admin > Organization > System Preference > Application Settings.
  • Valid SSL certificate
  • Internet connectivity
  • Requester created in ServiceOps

Part 1: Google Workspace and Cloud Platform Configuration

This section covers the necessary setup within your Google environment to allow ServiceOps to connect securely.

Step 1: Allow Chat Apps in Google Workspace

As a Google Workspace administrator, you must first permit Chat apps to be installed for your users.

  1. Sign in to the Google Admin console at admin.google.com.

  1. Navigate to Menu > Apps > Google Workspace > Google Chat.

  1. Click on Chat apps.
  2. Ensure the desired organizational unit is selected on the left. For the integration to work reliably, it is highly recommended to select the top-level organizational unit.
  3. In the Service Settings, select ON for everyone.

  1. Click Save.

Step 2: Create a Google Cloud Project

Every Chat app requires its own Google Cloud project.

  1. Go to the Google Cloud console.
  2. Create a new project.

Create a new Google Cloud Project

  1. Give it a descriptive name like "Motadata Virtual Agent". Select the Organization, Location, and click Create.

    Create a new Google Cloud Project

Step 3: Enable the Google Chat API

  1. With your new project selected, open the menu, navigate to the APIs and Services > Enabled APIs & services page.

    Enabled APIs and Services

  2. Click + ENABLE APIs and services.

    Enable APIs and Services button

  3. Search for "Google Chat API" and enable it for your project.

    Search for Google Chat API

    Enable Google Chat API

    Enable Google Chat API

  4. Next, create a Service Account. You can do so either by using the Manage service accounts link from the Google Chat API > Credentials tab, under the Service Accounts section or from menu > IAM & Admin > Service Accounts.

    Navigate to Service Accounts

Step 4: Create and Configure a Service Account

A service account allows ServiceOps to make authorized API calls to Google.

  1. In the Google Cloud console, navigate to menu > IAM & Admin > Service Accounts and click Create service account.

    Navigate to Service Accounts

  1. Provide a service account name (e.g., "Motadata Chat Service Account") and a description. Click Create and continue.

    Service Account Details

  2. Grant the service account a role. While Project > Editor is sufficient for initial setup, for stricter security, you should create a custom role with only the necessary permissions. Click CONTINUE.

Grant role to Service Account

Grant role to Service Account

  1. Skip the "Grant users access to this service account" step and click Done.

Finish creating Service Account

  1. Find the service account you just created. Click the three-dot menu under Actions and select Manage keys.

Manage keys for Service Account

  1. Click ADD KEY > Create new key.

    Add new key

  2. Select JSON as the key type and click CREATE. A JSON file containing the service account's private key will be downloaded.

Select JSON key type

Select JSON key type

Select JSON key type

Important

Treat the downloaded JSON key file like a password; it is highly sensitive. You will need the contents of this file for the ServiceOps configuration in Part 2.

This screen must be configured even for internal applications.

  1. In the Google Cloud console, go to APIs & Services > OAuth consent screen.

    OAuth Consent Screen

  2. Click Get Started.

    OAuth Consent Screen

  3. In the App Information section, fill in the required App details:

    • App name: Motadata ServiceOps Virtual Agent
    • User support email: Select an appropriate admin or support email address.

    OAuth App Information

    Click Next.

  4. In the Audience section,

    Select Internal to make the app available only to the users within the organization.

    OAuth App Information

  5. In the Contact Information,

    Enter the Email Address to receive notifications.

    OAuth App Information

    Click Next.

  6. Finish,

    • Click I agree to the Google API Services: User Data Policy.
    • Click Continue and Create.

    OAuth App Information

Step 6: Configure the Chat App

This step defines how your virtual agent will appear and behave in Google Chat.

  1. In the Google Cloud console, navigate to the Google Chat API configuration page (you can search for "Google Chat API" and select the Configuration tab).

    Google Chat API Configuration

  2. In the Configuration tab, disable the Build this Chat app as a Workspace add-on option. By default, it is enabled.

    Google Chat API Configuration

  3. Fill out the Application info:

    • App name: Motadata ServiceOps Virtual Agent
    • Avatar URL: An HTTPS link to a square icon (256x256 or larger recommended).
    • Description: A short description, e.g., "chat agent"

    Chat App Application Info

  4. Under Interactive features, toggle to Enable interactive features.

    Enable Interactive Features

  5. For Connection settings, select HTTP endpoint URL.

    • HTTP endpoint URL: <<Base URL>>/api/public/googlechat/readMessage (Replace <<Base URL>> with your ServiceOps instance URL).
    • Authentication Audience: Select Project Number.

    Connection Settings

    Connection Settings

  6. Click Save.

Step 7: Publish the App

To make the app available to your organization, you must publish it privately.

  1. In the Google Cloud console, search for and enable the Google Workspace Marketplace SDK.

Google Workspace Marketplace SDK

Google Workspace Marketplace SDK

  1. Go to the SDK's App Configuration page and fill out the required listing details. For App Visibility, you must select Private to make it available only to your domain.

Marketplace SDK App Configuration

  1. Complete the required fields and submit. The app will become available for users in your organization to find and use in Google Chat.

Marketplace SDK App Configuration

  1. In the Store Listing tab, enter the following App details:
  • Select the desired Language.

  • Enter the Application Name.

  • Enter a Short Description about the app.

  • Enter a Detailed Description about the app.

    Marketplace SDK App Configuration

  • Pricing: Select the "Free of charge" option.

  • Category: Select Utilities.

    Marketplace SDK App Configuration

  • Graphic Assets: This will be available in the app store while searching for the app.

  • Screenshots: Upload the screenshots displaying the features of the app.

    Marketplace SDK App Configuration

  • Support Links: Provide the support links like terms of service URL, privacy policy url, and support url.

  • Distribution: Enable the All Regions option.

    Marketplace SDK App Configuration

  1. Once all the details are provided, save the draft, and click Publish.

  2. Open the Google Chat in browser and find the app.

Marketplace SDK App Configuration

  1. In the Google Workspace Marketplace, search for the app and Install it. Here, motadata app is used.

Marketplace SDK App Configuration

  1. Click Continue.

Marketplace SDK App Configuration

  1. The following sign-in page appears. Select the account to sign-in to Google Chat and click Continue.

Marketplace SDK App Configuration

  1. The chat window appears as shown below.

Marketplace SDK App Configuration

  1. You can now type hi and begin the conversation as shown below.

Marketplace SDK App Configuration

Part 2: ServiceOps Configuration

After setting up the Google side, you need to configure ServiceOps to connect to your new Chat app.

Step 1: Configure Virtual Agent Channel

  1. In ServiceOps, navigate to Admin > Support Channel > Virtual Agent > Google Chat App Config tab.

    Google Chat tab

  2. Click the toggle to Enable the channel.

  3. Enable the Allow Notification flag if you want ServiceOps to send notifications to Google Chat.

  4. In the Service Account Details field, paste the entire content of the JSON key file you downloaded in Part 1, Step 4.

Select JSON key type

  1. Click Update to save the details.

Step 2: Configure Event Notifications

You can control which ServiceOps events trigger a notification in Google Chat.

  1. Navigate to Admin > Automation > Event Notifications > App notifications tab and click Edit.

App Notifications Tab

  1. In the new Google Chat section, enable the specific notifications you want to be sent.

Enable Google Chat Notifications

Prerequisite

This section is only available if Allow Notifications is enabled in the Virtual Agent settings (Part 2, Step 1).

Step 3: Configure Workflow Notifications

You can also send notifications as part of a workflow.

  1. Navigate to a Workflow and add a new App Action.

Enable Google Chat Notifications

  1. Select the App Type as Google Chat and Send a Notification as App Action Type.

  2. If the action is Send a Notification, you will need to provide the user's email address.

Additional Information

Chat Flow and Console

  • Chat Flow: In Admin > Virtual Agent > Chat flow settings, you can enable or disable specific chat flows for the Google Chat channel.

Enable Google Chat Notifications

  • Chat History: The chat history for interactions via Google Chat is available in the Chat Console > Virtual Agent.

Configuration Auditing

All configuration changes made in the Admin settings described above will be logged in the Configuration Audit log.

Current Limitations

note

Please be aware of the following limitations in the current release:

  • Attachments: Receiving attachments is not supported.
  • Confirmation Messages: "Confirm message" steps within a chat flow are not currently supported.