Google Chat App Setup
One-time Google Cloud configuration that lets a self-hosted answerLoops deployment receive and reply to Google Chat messages.
Google Chat has no "install" button that answerLoops can drive for an arbitrary Workspace, so a self-hosted deployment needs its own Chat app. You create it once in Google Cloud, and every organization on your deployment then pairs a space to it with a connect code. This page is the one-time operator setup.
When you are done, your deployment has a Chat app listening at your public address, and your team can connect spaces from Integrations → Google Chat. What they do from there (generating a connect code, posting /connect, escalation and thresholds) is in the Google Chat integration guide.
You do this once for the whole deployment, not once per organization. All organizations share the one Chat app you create here.
Set up the Chat app
Open the Google Cloud Console and create a project, or reuse one you already have.
Go to APIs & Services → Library, search for Google Chat API and click Enable.
Go to IAM & Admin → Service Accounts → Create Service Account. No special IAM roles are needed for basic messaging, because the Chat API authorizes through the Chat app configuration rather than project roles. Create a JSON key for the account and keep it somewhere safe. It becomes GOOGLE_CHAT_SERVICE_ACCOUNT_JSON.
In Google Chat API → Configuration, set:
-
App name, avatar and description to whatever you want people to see.
-
Functionality to "Receive 1:1 messages" and "Join spaces and group conversations".
-
Connection settings → HTTP endpoint URL to your public endpoint:
https://<your-domain>/api/google-chat/events -
Visibility. For an unlisted app used outside your own Workspace, list the domains, users or groups allowed to install it.
Set both variables on the app service and restart it:
GOOGLE_CHAT_SERVICE_ACCOUNT_JSON=<the full JSON key as a single-line string>
GOOGLE_CHAT_ENDPOINT_URL=https://<your-domain>/api/google-chat/eventsAny owner or admin can now open Integrations → Google Chat and follow the connect-code flow.
GOOGLE_CHAT_ENDPOINT_URL must exactly match the HTTP endpoint URL you entered in the Chat app configuration, including any trailing slash. If they differ, Google Chat events are rejected and nothing reaches answerLoops.
Who can install the app
The Chat app you just created is an unlisted app. It is quick to stand up, but each customer's Workspace admin has two manual steps: enabling third-party Chat apps for their domain (in their Admin Console → Apps → Google Workspace Marketplace apps settings), then adding the app to a space.
A Google Workspace Marketplace listing lets a customer install in a couple of clicks with no admin-console detour, at the cost of a one-time Google review (OAuth verification and listing review, commonly a few weeks). Both routes use the same endpoint and environment variables, so listing later does not mean redoing this setup. The Marketplace submission asks for a public privacy policy URL, and the hosted deployment already serves one at /privacy.
Troubleshooting
Where to go next
Discord Bot Setup
Create the Discord application, bot token and environment variables a self-hosted answerLoops deployment needs, and learn how the bot picks up config changes without a restart.
Email Channel Setup
Operator setup for the email channel on a self-hosted answerLoops deployment. Connect inbound mail, sending credentials and optional Gmail or Outlook mailbox connections.