Google Chat Setup

Phase 1: Infrastructure & Auth

Goal: Create the secure "home" for the bot.

1. Create Google Cloud Project

2. Enable APIs

  • Select and Open the project you just created on google cloud console
  • Navigate to APIs & Services > Library
  • Search and Enable Google Chat API
  • Search and Enable Google Workspace Marketplace SDK

3. Create Credentials

  • Go to IAM & Admin > Service Accounts

  • Click Create Service Account (Name: chat-bot-sa)

  • Enter service account name

  • Click Done (Skip roles)

  • Click the new email Actions> Manage Keys tab > Add Key > Create new key > Select JSON > Create > The JSON key should be downloaded on your system

  • Action: Securely send this .json file to Leena AI


Phase 2: Leena AI Dashboard Configuration

Goal: Link the brain to the body.

4. Configure Webhook

  • Generate the Region-based Webhook Endpoint URL by freezing unique app ID (XXX) on dashboard under Settings -> channels -> Google Chat page (e.g., https://hooks.leena.ai/googlechat/incoming?appId=XXXXXXXXXXX)
  • Load the Client's JSON key into the backend using the dashboard
  • Send this URL back to the Client

Phase 3: App Configuration

Goal: Connect the bot and publish it.

6. Configure Google Chat API

  • Go to APIs & Services > Enabled APIs & Services > Google Chat API > Configuration Tab

  • Disable the checkbox for "Build this Chat app as a Workspace add-on"

  • Provide required Application info

  • Interactive Features: Toggle ON

    • Under Functionality, check "Join spaces and group conversations"
  • Connection Settings: Select HTTP Endpoint URL and paste the URL from Step 4.

    • Under Authentication Audience, Select "HTTP endpoint URL"
  • Visibility: Uncheck "Make this Chat app available to specific people and groups in ..."

  • Click Save

7. Publish via Marketplace SDK

  • Go to APIs & Services > Google Workspace Marketplace SDK.
  • App Configuration Tab:
    • Visibility: Private (My Organization)
    • Installation: Check "Individual + Admin Install".
    • App Integration: Select "Chat app"
    • Under Developer Information, use below details:
      • Developer Name: Leena AI
      • Developer Website URL: https://leena.ai/
      • Developer Email: xxx
    • Click Save.
  • Store Listing Tab:

Phase 4: Deployment

Goal: Force-install the bot to enable "Welcome Messages".

8. Admin Install (The "Push")

  • Go to admin.google.com.
  • Navigate to Apps > Google Workspace Marketplace apps > Apps list.
  • Click Install app > Search for your bot > Click the card.
  • Select Admin Install (Not Individual).
  • Scope: Select "Everyone" or specific departments (e.g., "HR Team").
  • Result:
    • Bot appears in every user's Chat list automatically.
    • Leena AI can now send the "Hi, I'm here!" message proactively without waiting for the user.