Connect to Google Chat

Configure the Chat app and install the bot in Google Chat

What You’ll Configure

  • Chat app settings with webhook URL
  • App visibility and permissions
  • Bot installation in Google Chat

Prerequisites

Before starting, ensure you have:

  • Google Cloud Project created with Chat API enabled (Google Cloud Setup)
  • CloudFormation stack deployed with ChatPlatform set to GoogleChat or Both
  • GoogleChatWebhookURL from CloudFormation stack outputs

Integration Steps

1. Get the Webhook URL

  1. Go to AWS CloudFormation Console
  2. Select your stack
  3. Go to the Outputs tab
  4. Copy the GoogleChatWebhookURL value

The URL looks like: https://xxx.execute-api.region.amazonaws.com/prod-stackname/api/google-chat

2. Configure Chat App

Access Chat API Configuration

  1. Go to Google Chat API Configuration
  2. Or navigate: APIs & Services then Enabled APIs then Google Chat API then Configuration

Google Chat API Configuration page

Fill App Information

App name: Ohlala SmartOps

Avatar URL: https://767397776277-marketplace.s3.us-east-1.amazonaws.com/Ohlala_logo.png

Description: AI-powered AWS infrastructure management assistant

Enable Interactive features: ON

Configure App URL

Functionality: Select both:

  • Receive 1:1 messages
  • Join spaces and group conversations

Connection settings:

Google Chat API Configuration page

Authentication Audience: Select App URL

Set Visibility

  1. Select “Make this Chat app available to specific people and groups”
  2. Click Add people or groups
  3. Enter email addresses of all users who need access to the bot
  4. Click Save

Chat app visibility settings

3. Add Bot to Google Chat

For Personal Use (Direct Message)

  1. Open Google Chat
  2. Click + New chat then type “smartops”

Google Chat Find apps dialog

  1. Search for Ohlala SmartOps
  2. Click on the app
  3. Click Add
  4. Start chatting directly with the bot

For Space Use (Group)

  1. Open or create a Google Chat space
  2. Click the space name then Integrations
  3. Click Add apps
  4. Search for Ohlala SmartOps
  5. Click Add
  6. The bot will appear in the space

Adding bot to a Google Chat space

Test the Connection

Send Test Message

In Google Chat, message the bot:

@Ohlala SmartOps hello

Or in a direct message:

hello

Expected response:

Hello! I’m Ohlala SmartOps, your AI-powered AWS infrastructure assistant. Type ‘/help’ to see what I can do for you.

Test Basic Command

Try a simple command:

/help

Example conversation with bot showing /help command

The bot should respond with a help card showing available commands.

Verify Integration

Check Google Chat API

  1. Go to Google Cloud Console
  2. Navigate to APIs & ServicesDashboard
  3. Find Google Chat API
  4. Click to see usage metrics

Check AWS CloudWatch Logs

  1. Go to CloudWatch → Log Groups
  2. Find /aws/ecs/ohlala-smartops-...
  3. Look for logs containing google-chat or incoming POST requests
  4. Verify requests are being received and processed

Monitor API Gateway

  1. Go to API Gateway Console
  2. Select your API
  3. Go to Dashboard
  4. You should see requests to /api/google-chat endpoint

Troubleshooting

Bot Not Responding

Check Webhook URL

  • Verify URL in Google Chat API Configuration matches CloudFormation output
  • Ensure it includes the full path with /api/google-chat

Check ECS Service

  • Go to ECS Console
  • Verify service has running tasks
  • Check task logs for errors

Verify Google Chat is Enabled

  • Check CloudFormation parameter ChatPlatform is GoogleChat or Both
  • Verify ECS task has the environment variable set

Causes:

  • App visibility not configured correctly
  • You’re not in the allowed users/groups list
  • App not yet published (may take a few minutes)

Solution:

  1. Go to Chat API Configuration
  2. Check Visibility settings
  3. Add your email to allowed users
  4. Wait a few minutes and try again

Authentication Errors

Symptoms: 401 or 403 errors in CloudWatch logs

Solution:

  1. Verify service account JSON was correct in CloudFormation
  2. Check the JSON was properly formatted (single line, no extra quotes)
  3. Verify Project ID matches the service account’s project
  4. Check Lambda authorizer logs for specific error messages

“Service Unavailable” Error

Causes:

  • ECS task not running
  • API Gateway misconfigured
  • JWT validation failing

Solution:

  1. Check ECS service is running
  2. Verify API Gateway deployment
  3. Check CloudWatch logs for Lambda authorizer errors
  4. Verify the audience URL in Chat API Configuration matches your endpoint

Card Rendering Issues

Google Chat uses a different card format than Teams. If cards don’t render correctly:

  1. Check CloudWatch logs for card formatting errors
  2. Verify the QuickChart sidecar container is running in ECS
  3. Check S3 bucket for chart images (if using charts)

Google Chat vs Teams Differences

Feature Google Chat Microsoft Teams
Card Format Google Card JSON Adaptive Cards
Authentication Service Account + JWT Azure AD + Bot Framework
Charts Uploaded to S3 as images Rendered inline
Message Updates Limited support Full support
@mentions Required in spaces Optional

Success Checklist

Confirm everything is working:

  • Chat app configured with correct webhook URL
  • App visibility settings allow your access
  • Bot appears in Google Chat app search
  • Bot responds to messages
  • Help command works
  • No errors in CloudWatch logs

Next Step

Your bot is connected to Google Chat! Now verify everything is working:

Continue to Verification & Testing →