memcode docs
Agents

Google Chat

Run your memcode agent from a Google Chat app in your Workspace.

Google Chat apps are a Google Workspace feature, so this channel needs a Workspace account; it is not available on personal Gmail. You register a Chat app in a Google Cloud project and point it at your gateway.

Step 1: Create a Google Cloud project and enable the Chat API

In the Google Cloud console, create a project (or pick an existing one) and enable the Google Chat API.

Step 2: Configure the Chat app

On the Chat API's configuration page, set up the app: give it a name and avatar, and set its endpoint to:

https://<your-gateway-host>/webhook/googlechat

The gateway serves this path on port 8787; put it behind HTTPS with a tunnel or reverse proxy and use that public address here.

Step 3: Create a service account

In the same project, create a service account for the app and download its JSON key file. The gateway uses this key to send replies as the app.

Step 4: Configure

memcode gateway setup

Choose googlechat and enter the path to the JSON key file and your project number. When prompted for allowed users, enter the users who may drive the agent.

Step 5: Run

memcode gateway

then find the app in Google Chat and message it. DMs are always answered; in a space the bot acts only when you @mention the app, so it does not run on ordinary chatter. The reply comes back in the same conversation.

On this page