๐Ÿ”
ChannelsChapter 10 of 33ยท 6 min read

Chapter 10: Microsoft Teams & Google Chat

Microsoft Teams and Google Chat are the enterprise messaging platforms most common in large organizations. Both require more setup than consumer apps, but once connected, they give your AI agents access to the entire workforce through platforms they already use every day.


Part 1: Microsoft Teams

Overview

OpenClaw connects to Teams via the Azure Bot Framework. This requires an Azure subscription, but the Bot Framework tier is free for up to 300,000 messages per month โ€” more than enough for most teams.

Prerequisites

  • Microsoft Azure account (azure.microsoft.com)
  • Microsoft 365 account with Teams admin access
  • Your OpenClaw gateway with a public HTTPS URL

Step 1: Create an Azure Bot

  1. Go to the Azure Portal
  2. Click Create a resource โ†’ AI + Machine Learning โ†’ Azure Bot
  3. Fill in:
    • Bot handle: openclaw-bot
    • Subscription: your subscription
    • Resource group: create new or use existing
    • Pricing tier: F0 (Free)
    • Microsoft App ID: select Create new Microsoft App ID
  4. Click Review + Create โ†’ Create

Step 2: Get Your App Credentials

  1. Once the bot is created, go to Configuration
  2. Note the Microsoft App ID
  3. Click Manage next to the App ID
  4. Go to Certificates & secrets โ†’ New client secret
  5. Set expiry to 24 months, click Add
  6. Copy the Value immediately (only shown once) โ€” this is your App Password

Step 3: Configure the Messaging Endpoint

  1. In your Azure Bot's Configuration
  2. Set the Messaging endpoint to: https://your-domain.com/webhooks/teams
  3. Click Apply

Step 4: Add Teams Channel

  1. In your Azure Bot, go to Channels
  2. Click Microsoft Teams
  3. Accept the terms and click Apply
  4. The status should show Running

Step 5: Configure openclaw.json

{
  "channels": {
    "teams": {
      "enabled": true,
      "appId": "${TEAMS_APP_ID}",
      "appPassword": "${TEAMS_APP_PASSWORD}",
      "webhookPath": "/webhooks/teams",
      "respondToMentions": true,
      "respondToDMs": true
    }
  }
}

Set environment variables:

export TEAMS_APP_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
export TEAMS_APP_PASSWORD="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Step 6: Install the Bot in Teams

  1. In Teams, go to Apps โ†’ Manage your apps โ†’ Upload an app
  2. Download your bot's manifest from Azure Bot โ†’ Channels โ†’ Microsoft Teams โ†’ Get bot embed code
  3. Zip the manifest files and upload to Teams
  4. The bot now appears in Teams and can be added to channels

Teams Allowlist

Teams allowlists use Azure AD user IDs (GUID format):

{
  "workspaces": [
    {
      "id": "enterprise",
      "channels": ["teams"],
      "agent": "claude-sonnet",
      "allowlist": [
        "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"
      ]
    }
  ]
}

Find a user's Azure AD ID in the Azure Portal under Azure Active Directory โ†’ Users โ†’ [user] โ†’ Object ID.


Teams Usage

Direct message the bot: Find OpenClaw in the Teams app list and send a DM.

Mention in a channel:

@OpenClaw help me write a SQL query for this report

Adaptive Cards: OpenClaw can send Teams-formatted Adaptive Cards for rich interactive responses โ€” enabled automatically when the Teams adapter detects the channel.


Part 2: Google Chat

Overview

OpenClaw connects to Google Chat via the Google Chat API using a service account. This requires a Google Workspace (G Suite) account โ€” it does not work with free Gmail accounts.

Prerequisites

  • Google Workspace account (paid)
  • Google Cloud project with billing enabled
  • Admin access to your Google Workspace to publish the Chat app

Step 1: Create a Google Cloud Project

  1. Go to console.cloud.google.com
  2. Click Create Project
  3. Name it openclaw-chat
  4. Note the Project ID

Step 2: Enable the Chat API

  1. Go to APIs & Services โ†’ Enable APIs & Services
  2. Search for Google Chat API
  3. Click Enable

Step 3: Create a Service Account

  1. Go to IAM & Admin โ†’ Service Accounts
  2. Click Create Service Account
  3. Name: openclaw-chat-bot
  4. Grant role: Project โ†’ Editor
  5. Click Done
  6. Click the service account โ†’ Keys โ†’ Add Key โ†’ Create new key โ†’ JSON
  7. Save the downloaded JSON file โ€” this is your credentials file

Step 4: Configure the Chat App

  1. Go to Google Chat API โ†’ Configuration
  2. Fill in:
    • App name: OpenClaw
    • Avatar URL: your logo URL
    • Description: AI assistant powered by OpenClaw
    • Functionality: enable Receive 1:1 messages and Join spaces and group conversations
    • Connection settings: select App URL
    • App URL: https://your-domain.com/webhooks/google-chat
  3. Under Visibility, select Specific people and groups in your domain
  4. Click Save

Step 5: Configure openclaw.json

{
  "channels": {
    "google-chat": {
      "enabled": true,
      "credentialsPath": "${GOOGLE_CREDENTIALS_PATH}",
      "webhookPath": "/webhooks/google-chat",
      "projectId": "${GOOGLE_PROJECT_ID}"
    }
  }
}
export GOOGLE_CREDENTIALS_PATH="/home/user/.openclaw/google-credentials.json"
export GOOGLE_PROJECT_ID="openclaw-chat"

Step 6: Google Chat Allowlist

Google Chat allowlists use email addresses:

{
  "workspaces": [
    {
      "id": "company",
      "channels": ["google-chat"],
      "agent": "claude-sonnet",
      "allowlist": [
        "alice@company.com",
        "bob@company.com"
      ]
    }
  ]
}

To allow everyone in your Google Workspace domain:

{
  "allowlist": ["*@company.com"]
}

Google Chat Usage

Direct message the bot: Find OpenClaw in the Google Chat apps list and send a DM.

Mention in a Space:

@OpenClaw summarize the action items from this thread

Cards: Google Chat supports rich card responses with images, buttons, and structured sections โ€” OpenClaw uses these automatically for complex responses.


Troubleshooting

Microsoft Teams

ProblemSolution
Bot not respondingCheck messaging endpoint URL is correct and HTTPS
Authentication errorsVerify App ID and App Password match Azure Bot config
Bot not visible in TeamsRe-upload the app manifest with updated credentials
401 UnauthorizedApp Password may have expired โ€” create a new client secret

Google Chat

ProblemSolution
Webhook not verifiedCheck App URL is publicly accessible and returns HTTP 200
Service account errorsVerify credentials JSON path is correct
Bot not appearing in searchCheck visibility settings in Chat API configuration
Domain allowlist not workingUse exact domain format: *@yourdomain.com

Enterprise Comparison

FeatureMicrosoft TeamsGoogle Chat
Setup difficultyHighHigh
Requires paid accountAzure (free tier available)Google Workspace (paid)
On-premises optionTeams ServerNo
Adaptive/Rich cardsYesYes
Thread supportYesYes (Spaces)
Best forMicrosoft 365 orgsGoogle Workspace orgs
Message limits300K/month freeAPI quota based

Next: Chapter 11 โ€” All Chat Commands โ€” Every built-in slash command available to OpenClaw users across all channels.