> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-sre/ai-sre-for-administrators/set-up-runbook-management/integrations/collaboration/google-chat.md).

# Google Chat Integration for Runbooks

Harness AI SRE integrates with Google Chat at the organization level, enabling automated incident communication and team collaboration for organizations using Google Workspace.

### Overview <a href="#overview" id="overview"></a>

Google Chat integration enables your runbooks to:

* Send automated notifications to Google Chat spaces
* Post incident updates to linked spaces
* Coordinate response teams using Google Workspace tools
* Maintain communication history in the incident timeline

***

### Set up the integration <a href="#set-up-the-integration" id="set-up-the-integration"></a>

Before using Google Chat actions in runbooks, configure the organization-level Google Chat integration.

#### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **Google Cloud Platform project:** With Pub/Sub API enabled
* **Google Chat admin access:** For your Google Workspace organization
* **Harness Organization Admin role:** To configure third-party integrations

#### Setup steps <a href="#setup-steps" id="setup-steps"></a>

Connect the organization-level integration with these steps:

1. Go to **Organization Settings**, then **Third-Party Integrations (AI SRE)**.
2. Click **Connect** for **Google Chat**.
3. Complete the OAuth authorization flow.
4. Configure GCP Project ID and Pub/Sub Topic Name.
5. Test the connection with a Space ID.
6. Click **Save**.

Go to [Google Chat Integration](/ai-sre/ai-sre-for-administrators/set-up-integration-management/communication/google-chat.md) to review complete setup instructions, including GCP Pub/Sub configuration.

***

### Use Google Chat actions in runbooks <a href="#use-google-chat-actions-in-runbooks" id="use-google-chat-actions-in-runbooks"></a>

Google Chat actions are configured through the runbook action form in the UI:

1. **In your runbook**, click **New Step**, then **Action**.

   ![New Step Menu](/files/iOyWvCJr9CETVf15Lhk9)
2. In the **Select Action** dialog, go to the **Communication** category.
3. Select the Google Chat action you need from the available options.

   ![Select Action Dialog](/files/JwsqQZxRD4GN5BaNp8wJ)
4. Configure the action through a form-based interface.

#### Google Chat post message action <a href="#google-chat-post-message-action" id="google-chat-post-message-action"></a>

Sends a message to a specified Google Chat space.

**Form fields:**

* **Space ID:** The Google Chat space identifier
  * Find this in the Google Chat space URL: `https://chat.google.com/room/SPACE_ID`
  * Supports Mustache variables: `{{incident.chat_space_id}}`
* **Message:** Message text to send
  * Supports Mustache variables: `{{Activity.title}}`, `{{Activity.summary}}`
  * Plain text format (HTML formatting not currently supported)

**Example configuration:**

```yaml
Space ID: {{incident.chat_space_id}}
Message: |
  🚨 Incident Alert: {{Activity.title}}
  
  Severity: {{Activity.severity}}
  Status: {{Activity.status}}
  
  Summary: {{Activity.summary}}
  
  View incident: https://app.harness.io/incidents/{{Activity.id}}
```

**Available Mustache variables:**

* `{{Activity.title}}`: AI SRE incident title
* `{{Activity.id}}`: AI SRE incident ID
* `{{Activity.severity}}`: AI SRE incident severity
* `{{Activity.status}}`: AI SRE incident status
* `{{Activity.summary}}`: AI SRE incident summary
* Any custom incident fields configured in your incident template

***

### Best practices <a href="#best-practices" id="best-practices"></a>

#### Message structure <a href="#message-structure" id="message-structure"></a>

Structure Google Chat messages so responders can scan them quickly:

* **Use clear formatting:** Break messages into sections with blank lines for readability.
* **Include severity indicators:** Use emoji or text indicators for severity (🚨 Critical, ⚠️ High, ℹ️ Low).
* **Link to dashboards:** Include links to monitoring dashboards, runbooks, or incident details.
* **Keep messages concise:** Google Chat messages should be scannable; avoid large blocks of text.

#### Space management <a href="#space-management" id="space-management"></a>

Organize spaces so incident communication stays traceable:

* **Use dedicated incident spaces:** Create a Google Chat space for each incident rather than posting to shared channels.
* **Document space IDs:** Store frequently used space IDs as custom incident fields or runbook variables.
* **Link spaces to incidents:** Use the Incident Details page to link Google Chat spaces so all messages appear in the timeline.

#### Runbook design <a href="#runbook-design" id="runbook-design"></a>

Design runbooks to post meaningful updates without overwhelming the space:

* **Send updates at key milestones:** Post messages when status changes, mitigation is applied, or resolution is confirmed.
* **Avoid message spam:** Do not send messages in tight loops; use conditional logic to limit frequency.
* **Test with a sandbox space:** Validate runbook actions in a test Google Chat space before using in production incidents.

***

### Common use cases <a href="#common-use-cases" id="common-use-cases"></a>

#### Incident notification <a href="#incident-notification" id="incident-notification"></a>

Send an initial notification when an incident is created:

**Runbook action:**

* **Action:** Google Chat Post Message
* **Space ID:** `{{incident.chat_space_id}}`
* **Message:**

```
🚨 New Incident Created

Title: {{Activity.title}}
Severity: {{Activity.severity}}
Assigned to: {{Activity.assignee}}

Link: https://app.harness.io/incidents/{{Activity.id}}
```

#### Status update broadcast <a href="#status-update-broadcast" id="status-update-broadcast"></a>

Send a status update when the incident status changes:

**Runbook action:**

* **Action:** Google Chat Post Message
* **Space ID:** `{{incident.chat_space_id}}`
* **Message:**

```
ℹ️ Status Update

Incident: {{Activity.title}}
Previous Status: {{Activity.previous_status}}
New Status: {{Activity.status}}

Updated by: {{Activity.updated_by}}
```

#### Resolution notification <a href="#resolution-notification" id="resolution-notification"></a>

Notify the team when the incident is resolved:

**Runbook action:**

* **Action:** Google Chat Post Message
* **Space ID:** `{{incident.chat_space_id}}`
* **Message:**

```
✅ Incident Resolved

Incident: {{Activity.title}}
Resolution Time: {{Activity.resolution_time}}

Root Cause: {{Activity.root_cause}}

Post-mortem: https://app.harness.io/incidents/{{Activity.id}}/postmortem
```

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>A runbook message does not appear in the Google Chat space</summary>

Verify the Google Chat integration is connected in Organization Settings, confirm the Space ID matches the Google Chat space URL, ensure the authorized Google account has access to the space, and check the runbook execution logs.

</details>

<details>

<summary>Mustache variables do not render in a Google Chat runbook message</summary>

Confirm the variable name matches the incident field exactly (case-sensitive), use the correct {{variable\_name}} syntax, and supply default values for optional fields such as {{Activity.custom\_field | default: 'N/A'}}.

</details>

<details>

<summary>A Google Chat runbook action fails with an Unauthorized error</summary>

Re-authorize the Google Chat integration in Organization Settings, confirm the Harness app is approved by your Google Workspace admin, and verify the authorized account can access the target space.

</details>

***

### Permissions <a href="#permissions" id="permissions"></a>

The Google Chat integration requires these permissions:

* **chat.messages.create:** Send messages to Google Chat spaces
* **chat.spaces.readonly:** Read space metadata (for space ID validation)

These permissions are requested during the OAuth authorization flow.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

* [Google Chat Integration](/ai-sre/ai-sre-for-administrators/set-up-integration-management/communication/google-chat.md): Set up the organization-level integration.
* [Create a Runbook](/ai-sre/ai-sre-for-administrators/set-up-runbook-management/create-runbook.md): Build automated response workflows.
* [AI Scribe Agent](/ai-sre/ai-sre-for-incident-responders/use-ai-agents/ai-agent.md): Enable automatic capture of key events from Google Chat conversations.
