This tutorial shows how to make a Google Chat app that answers questions based on conversations in Chat spaces with generative AI powered by Vertex AI with Gemini. The Chat app uses the Google Workspace Events API plus Pub/Sub to recognize and answer questions posted in Chat spaces in real time, even when it isn't mentioned.
The Chat app uses all the messages sent in the space as a data source and knowledge base: when someone asks a question, the Chat app checks for previously shared answers and then shares one. If no answer is found, it says it can't answer. On each answer, users can click an accessory action button to @mention a space manager and ask for an answer. By using Gemini AI, the Google Chat app adapts and grows its knowledge base as it continuously trains on conversations in spaces it's added to.
Here's how the Chat app works in an employee onboarding and support space:
-
Figure 2. Dana asks if the company offers public speaking training. -
Figure 3. The AI knowledge assistant Chat app prompts Vertex AI with Gemini to answer Dana's question based on the Chat space's conversation history and then shares the answer.
Prerequisites
A Business or Enterprise Google Workspace account with access to Google Chat.
Access to Google Cloud services to do the following:
- Create a Google Cloud project.
- Link a Google Cloud billing account to the Cloud project. To learn if you have access, see Permissions required to enable billing.
- Use unauthenticated Google Cloud Function invocations, which you can verify by determining whether your Google Cloud organization uses domain restricted sharing.
If necessary, ask your Google Cloud administrator for access or permission.
If using the Google Cloud CLI, a Node.js development environment configured to work with gcloud CLI. See Setting up a Node.js development environment.
Objectives
- Build a Chat app that uses generative AI to answer questions based on knowledge shared in Chat space conversations.
- With generative AI:
- Detect and answer employee questions.
- Continuously learn from ongoing conversations in a Chat space.
- Listen for and respond to messages in a Chat space in real time even when the Chat app isn't directly messaged.
- Persist messages by writing to, and reading from, a Firestore database.
- Facilitate collaboration in a Chat space by mentioning space managers when no answer to a question is found.
Architecture
The following diagram shows the architecture of the Google Workspace and Google Cloud resources used by the AI knowledge assistant Chat app.
The AI knowledge assistant Chat app works like this:
A user adds the AI knowledge assistant Chat app to a Chat space:
The Chat app prompts the user who added it to the Chat space to configure authentication and authorization.
The Chat app fetches the space's messages by calling the
spaces.messages.list
method in the Chat API and then stores the fetched messages in a Firestore database.The Chat app calls the
subscriptions.create
method in the Google Workspace Events API to start listening for events like messages in the space. The subscription's notification endpoint is a Pub/Sub topic that uses Eventarc to forward the event to the Chat app.The Chat app posts an introduction message to the space.
A user in the Chat space posts a message:
The Chat app receives the message in real time from the Pub/Sub topic.
The Chat app adds the message to the Firestore database.
If a user later edits or deletes the message, the Chat app receives the updated or deleted event in real time and then updates or deletes the message in the Firestore database.
The Chat app sends the message to Vertex AI with Gemini:
The prompt instructs Vertex AI with Gemini to check if the message includes a question. If it does, Gemini answers the question based on the Chat space's message history kept in Firestore and the Google Chat app then sends the message to the Chat space. If it doesn't, don't respond.
If Vertex AI with Gemini answers the question, the Chat app posts the answer by calling the
spaces.messages.create
method in Chat API using app authentication.If Vertex AI with Gemini can't answer the question, the Chat app posts a message saying that it can't find an answer to that question in the Chat space's history.
Messages always include an accessory action button that users can click, which causes the Chat app to @mention a space manager asking them to answer.
The Chat app receives a lifecycle notification from the Google Workspace Events API that the Chat space subscription is about to expire:
- The Chat app sends a request to renew the
subscription by calling the
subscriptions.patch
method in the Google Workspace Events API.
- The Chat app sends a request to renew the
subscription by calling the
The Chat app is removed from a Chat space:
The Chat app deletes the subscription by calling the
subscriptions.delete
method in the Google Workspace Events API.The Chat app deletes the Chat space's data from Firestore.
Review the products used by the AI knowledge assistant Chat app
The AI knowledge assistant Chat app uses the following Google Workspace and Google Cloud products:
- Vertex AI API with Gemini: A generative AI platform powered by Gemini. The AI knowledge assistant Chat app uses Vertex AI API with Gemini to recognize, understand, and answer employee questions.
-
Chat API:
An API for developing Google Chat apps that receive and respond to
Chat interaction events, like messages. The AI
knowledge assistant Chat app uses Chat API to:
- Receive and respond to interaction events sent by Chat.
- List messages sent in a space.
- Post responses to user questions in a space.
- Configure attributes that determine how it appears in Chat, like name and avatar image.
- Google Workspace Events API: This API lets you subscribe to events and manage change notifications across Google Workspace applications. The AI knowledge assistant Chat app uses the Google Workspace Events API to listen for messages posted in a Chat space so it can detect and answer questions even when it isn't mentioned.
- Firestore: A serverless document database. The AI knowledge assistant Chat app uses Firestore to store data about messages sent in a Chat space.
- Pub/Sub: Pub/Sub is an asynchronous and scalable messaging service that decouples services producing messages from services processing those messages. The AI knowledge assistant Chat app uses Pub/Sub to receive subscription events from Chat spaces.
- Eventarc: Eventarc lets you build event-driven architectures without having to implement, customize, or maintain the underying infrastructure. The AI knowledge assistant Chat app uses Eventarc to route events from Pub/Sub to a Chat space and the Cloud Function that receives and processes the subscription events.
-
Cloud Functions:
A lightweight serverless compute service that lets you create
single-purpose, standalone functions that can respond to Chat
interaction and subscription events without the need to manage a server or runtime
environment. The AI knowledge assistant Chat app
uses two Cloud Functions named:
-
app
: Host the HTTP endpoint that Chat sends interaction events to and as a compute platform to run logic that processes and responds to these events. -
eventsApp
: Receives and process Chat space events like messages from a Pub/Sub subscription.
- Cloud Build: A fully managed continuous integration, delivery and deployment platform that runs automated builds.
- Cloud Run: A fully managed environment for running containerized apps.
-
Prepare the environment
This section shows how to create and configure a Google Cloud project for the Chat app.
Create a Google Cloud project
Google Cloud console
- In the Google Cloud console, go to Menu > IAM & Admin > Create a Project.
-
In the Project Name field, enter a descriptive name for your project.
Optional: To edit the Project ID, click Edit. The project ID can't be changed after the project is created, so choose an ID that meets your needs for the lifetime of the project.
- In the Location field, click Browse to display potential locations for your project. Then, click Select.
- Click Create. The Google Cloud console navigates to the Dashboard page and your project is created within a few minutes.
gcloud CLI
In one of the following development environments, access the Google Cloud
CLI (gcloud
):
-
Cloud Shell: To use an online terminal with the gcloud CLI
already set up, activate Cloud Shell.
Activate Cloud Shell -
Local Shell: To use a local development environment,
install and
initialize
the gcloud CLI.
To create a Cloud project, use thegcloud projects create
command: Replace PROJECT_ID by setting the ID for the project you want to create.gcloud projects create PROJECT_ID
Enable billing for the Cloud project
Google Cloud console
- In the Google Cloud console, go to Billing. Click Menu > Billing > My Projects.
- In Select an organization, choose the organization associated with your Google Cloud project.
- In the project row, open the Actions menu ( ), click Change billing, and choose the Cloud Billing account.
- Click Set account.
gcloud CLI
- To list available billing accounts, run:
gcloud billing accounts list
- Link a billing account with a Google Cloud project:
gcloud billing projects link PROJECT_ID --billing-account=BILLING_ACCOUNT_ID
Replace the following:
PROJECT_ID
is the Project ID for the Cloud project for which you want to enable billing.BILLING_ACCOUNT_ID
is the billing account ID to link with the Google Cloud project.
Enable the APIs
Google Cloud console
In the Google Cloud console, enable the Google Chat API, the Vertex AI API, the Cloud Functions API, the Firestore API, the Cloud Build API, the Pub/Sub API, the Google Workspace Events API, the Eventarc API and the Cloud Run Admin API.
Confirm that you're enabling the APIs in the correct Cloud project, then click Next.
Confirm that you're enabling the correct APIs, then click Enable.
gcloud CLI
If necessary, set the current Cloud project to the one you created:
gcloud config set project PROJECT_ID
Replace PROJECT_ID with the Project ID of the Cloud project you created.
Enable the Google Chat API, the Vertex AI API, the Cloud Functions API, the Firestore API, the Cloud Build API, the Pub/Sub API, the Google Workspace Events API, the Eventarc API and the Cloud Run Admin API:
gcloud services enable chat.googleapis.com \ aiplatform.googleapis.com \ cloudfunctions.googleapis.com \ firestore.googleapis.com \ cloudbuild.googleapis.com \ pubsub.googleapis.com \ workspaceevents.googleapis.com \ eventarc.googleapis.com \ run.googleapis.com
Set up authentication and authorization
Authentication and authorization lets the Chat app access resources in Google Workspace and Google Cloud.
In this tutorial, you publish the Google Chat app internally so it's OK to use placeholder information. Before publishing the Google Chat app externally, replace placeholder information with real information for the consent screen.
Configure the OAuth consent screen, specify scopes, and register your app
In the Google Cloud console, go to Menu > APIs & Services > OAuth consent screen.
Under User type, select Internal, then click Create.
In App name, type
AI knowledge assistant
.In User support email, select your email address or an appropriate Google group.
Under Developer contact information, enter your email address.
Click Save and Continue.
Click Add or Remove Scopes. A panel appears with a list of scopes for each API that you've enabled in your Cloud project.
Under Manually add scopes, paste the following scope:
https://www.googleapis.com/auth/chat.messages
Click Add to Table.
Click Update.
Click Save and Continue.
Review the app registration summary, then click Back to Dashboard.
Create OAuth client ID credentials
In the Google Cloud console, go to Menu > APIs & Services > Credentials.
Click Create Credentials > OAuth client ID.
Click Application type > Web application.
In the Name field, type a name for the credential. This name is only shown in the Google Cloud console.
Under Authorized redirect URIs, click Add URI.
In URIs 1, type the following:
https://REGION-PROJECT_ID.cloudfunctions.net/app/oauth2
Replace the following:
- REGION: the Cloud Function's region, like
us-central1
. Later, when you create the two Cloud Functions, you must set their region to this value. - PROJECT_ID: the Project ID of the Cloud project you created.
- REGION: the Cloud Function's region, like
Click Create.
From the OAuth client created window, click Download JSON.
Save the downloaded file as
client_secrets.json
. Later, when you create the two Cloud Functions, you include theclient_secrets.json
file in each deployment.Click OK.
Create the Pub/Sub topic
The Pub/Sub topic works with Google Workspace Events API to subscribe to events in a Chat space like messages and notify the Chat app in real time.
Here's how to create the Pub/Sub topic:
Google Cloud console
In the Google Cloud console, go to Menu > Pub/Sub.
Click Create Topic.
In Topic ID, type
events-api
.Deselect Add a default subscription.
Under Encryption, select Google-managed encryption key.
Click Create. The Pub/Sub topic appears.
For this Pub/Sub topic and Google Workspace Events API to work together, give the Chat IAM user permission to post to the Pub/Sub topic:
In the events-api panel, under PERMISSIONS, click Add Principal.
Under Add principals, in New principals, type
chat-api-push@system.gserviceaccount.com
.Under Assign roles, in Select a role, select Pub/Sub > Pub/Sub Publisher.
Click Save.
gcloud CLI
Create a Pub/Sub topic with topic ID
events-api
:gcloud pubsub topics create events-api
Give the Chat IAM user permission to post to the Pub/Sub topic:
gcloud pubsub topics add-iam-policy-binding events-api \ --member='serviceAccount:chat-api-push@system.gserviceaccount.com' \ --role='roles/pubsub.publisher'
Create the Firestore database
The Firestore database persists and retrieves
data from Chat spaces, like messages. You don't define the data
model, which is set implicitly in the sample code by the model/message.js
and
services/firestore-service.js
files.
The AI knowledge assistant Chat app database uses a NoSQL data model based on Firestore data model.
documents organized into collections. To learn more, seeThe following diagram is an overview of the AI knowledge assistant Chat app's data model:
The root contains two collections:
spaces
, where each document represents a Chat space that the Chat app is added to. Each message is represented by a document in themessages
subcollection.users
, where each document represents a user who added the Chat app to a Chat space.
View collection, document, and field definitions
spaces
A Chat space that includes the AI knowledge assistant Chat app.
Fields | |
---|---|
Document ID | String Unique ID of a specific space. A part of the space's resource name in Chat API. |
messages | Subcollection of Documents ( Messages sent in the Chat space. Corresponds with the Document ID of a message in Firebase. |
spaceName | String The unique name of the space in the Chat API. Corresponds with the space's resource name in Chat API. |
messages
Messages sent in the Chat space.
Fields | |
---|---|
Document ID | String Unique ID of a specific message. |
name | String The unique name of a message in the Chat API. Corresponds with the message's resource name in Chat API. |
text | String The message's text body. |
time | String (Timestamp format) The time at which the message was created. |
users
Users who added the AI knowledge assistant Chat app to a Chat space.
Fields | |
---|---|
Document ID | String Unique ID of a specific user. |
accessToken | String The access token granted during OAuth 2.0 user authorization used to call Google Workspace APIs. |
refreshToken | String The refresh token granted during OAuth 2.0 user authorization. |
Here's how to create the Firestore database:
Google Cloud console
In the Google Cloud console, go to Menu > Firestore.
Click Create database.
From Select your Firestore mode, click Native mode.
Click Continue.
Configure the database:
In Name your database, leave the Database ID as
(default)
.Under Location type, select Region.
In Region, specify a region for your database, such as
us-central1
. For best performance, select the same or nearby location as the Chat app's Cloud Functions.
Click Create database.
gcloud CLI
Create a Firestore database in Native mode:
gcloud firestore databases create \ --location=LOCATION \ --type=firestore-native
Replace LOCATION with the name of a Firestore region, such as
us-central1
. For best performance, select the same or nearby location as the Chat app's Cloud Functions.
Create and deploy the Chat app
Now that your Google Cloud project is created and configured, you're ready to build and deploy the Chat app. In this section, you do the following:
- Create and deploy two Cloud Functions. One to respond to Chat interaction events and one to respond to Pub/Sub events.
- Create and deploy a Chat app on the Google Chat API configuration page.
Create and deploy the Cloud Functions
In this section, you create and deploy two Cloud Functions named:
app
: Hosts and runs the Chat app's code that responds to events received from Chat as HTTP requests.eventsApp
: Receives and processes Chat space events like messages from Pub/Sub.
Together, these Cloud Functions make up the AI knowledge assistant Chat app's application logic.
Optionally, before creating the Cloud Functions, take a moment to review and familiarize yourself with the sample code hosted on GitHub.
Create and deploy app
Google Cloud console
Download the code from GitHub as a zip file.
Extract the downloaded zip file.
The extracted folder contains the entire Google Workspace samples repository.
In the extracted folder, navigate to the
google-chat-samples-main/node/ai-knowledge-assistant
directory.In the
google-chat-samples/node/ai-knowledge-assistant
directory, add theclient_secrets.json
file that you downloaded when you created OAuth client ID credentials for authentication and authorization.Compress the contents of the
ai-knowledge-assistant
folder into a zip file.The root directory of the zip file must contain the following files and folders:
.gcloudignore
.gitignore
README.md
deploy.sh
env.js
events_index.js
http_index.js
index.js
client_secrets.json
package-lock.json
package.json
controllers/
model/
services/
test/
In the Google Cloud console, go to Menu > Cloud Functions.
Make sure that the Google Cloud project for your Chat app is selected.
Click
Create Function.On the Create function page, set up your function:
- In Environment, select Cloud Run Function.
- In Function name, type
app
. - In Region, select a region, like
us-central1
. This region must match the region you set in the authorized redirect URI when you created OAuth client ID credentials for authentication and authorization. - In Trigger type, select HTTPS.
- Under Authentication, select Allow unauthenticated invocations.
- Click Next.
In Runtime, select Node.js 20.
In Entry point, delete the default text and enter
app
.In Source code, select Zip upload.
In Destination bucket, create or select a bucket:
- Click Browse.
- Choose a bucket.
- Click Select.
Google Cloud uploads the zip file to and extracts the component files in this bucket. Cloud Functions then copies the component files into the Cloud Function.
In Zip file, upload the zip file you downloaded from GitHub, extracted, and recompressed:
- Click Browse.
- Navigate to and select the zip file.
- Click Open.
Click Deploy.
The Cloud Functions detail page opens, and your function appears with two progress indicators: one for the build and one for the service. When both progress indicators disappear and are replaced with a check mark, your function is deployed and ready.
Edit the sample code to set constants:
- On the Cloud Function detail page, click Edit.
- Click Next.
- In Source code, select Inline editor.
- In the inline editor, open and edit the
env.js
file:- Set the value of project to your Cloud project ID.
- Set the value of location to the Cloud Function's
region,
like
us-central1
.
Click Deploy.
gcloud CLI
Clone the code from GitHub:
git clone https://github.com/googleworkspace/google-chat-samples.git
Switch to the directory that holds the code for this AI knowledge assistant Chat app:
cd google-chat-samples/node/ai-knowledge-assistant
In the
google-chat-samples/node/ai-knowledge-assistant
directory, add theclient_secrets.json
file that you downloaded when you created OAuth client ID credentials for authentication and authorization.Edit the
env.js
file to set environment variables:- Set the value of project to your Cloud project ID.
- Set the value of location to the Cloud Function's
region, like
us-central1
.
Deploy the Cloud Function to Google Cloud:
gcloud functions deploy app \ --gen2 \ --region=REGION \ --runtime=nodejs20 \ --source=. \ --entry-point=app \ --trigger-http \ --allow-unauthenticated
Replace REGION with the value of the Cloud Function's region to match the one set in the
env.js
file, likeus-central1
.
Create and deploy eventsApp
Google Cloud console
In the Google Cloud console, go to Menu > Cloud Functions.
Make sure that the Google Cloud project for your Chat app is selected.
Click
Create Function.On the Create function page, set up your function:
- In Environment, select Cloud Run Function.
- In Function name, type
eventsApp
. - In Region, select a region, like
us-central1
. This region must match the region you set in the authorized redirect URI when you created OAuth client ID credentials for authentication and authorization. - In Trigger type, select Cloud Pub/Sub.
- In Cloud Pub/Sub topic, select the Pub/Sub topic name you
created, which has the format
projects/PROJECT/topics/events-api
where PROJECT is your Cloud project ID. - If you see a message beginning to
Service account(s) might not have enough permissions to deploy the function with the selected trigger.
, click Grant All. - Click Next.
In Runtime, select Node.js 20.
In Entry point, delete the default text and enter
eventsApp
.In Source code, select Zip from Cloud Storage.
In Cloud Storage location, click Browse.
Select the bucket you uploaded the zip file to when you created the
app
Cloud Function.Click the zip file you uploaded.
Click Select.
Click Deploy.
The Cloud Functions detail page opens, and your function appears with three progress indicators: one for the build, one for the service, and one for the trigger. When all three progress indicators disappear and are replaced with a check mark, your function is deployed and ready.
Edit the sample code to set constants:
- On the Cloud Function detail page, click Edit.
- Click Next.
- In Source code, select Inline editor.
- In the inline editor, open and edit the
env.js
file:- Set the value of project to your Cloud project ID.
- Set the value of location to the Cloud Function's
region,
like
us-central1
.
Click Deploy.
gcloud CLI
In gcloud CLI, if you are not already there, switch to the directory that holds the code for this AI knowledge assistant Chat app that you previously cloned from GitHub:
cd google-chat-samples/node/ai-knowledge-assistant
In the
google-chat-samples/node/ai-knowledge-assistant
directory, add theclient_secrets.json
file that you downloaded when you created OAuth client ID credentials for authentication and authorization.Edit the
env.js
file to set environment variables:- Set the value of project to your Cloud project ID.
- Set the value of location to the Cloud Function's
region, like
us-central1
.
Deploy the Cloud Function to Google Cloud:
gcloud functions deploy eventsApp \ --gen2 \ --region=REGION \ --runtime=nodejs20 \ --source=. \ --entry-point=eventsApp \ --trigger-topic=events-api
Replace REGION with the value of the Cloud Function's region to match the one set in the
env.js
file, likeus-central1
.
Copy the app
Cloud Function's trigger URL
You paste the app
Cloud Function's trigger URL in the next section
when you
Configure the Chat app in the Google Cloud console.
Google Cloud console
In the Google Cloud console, go to Menu > Cloud Functions.
In the Name column of the list of Cloud Functions, click
app
.Click Trigger.
Copy the URL.
gcloud CLI
Describe the
app
Cloud Function:gcloud functions describe app
Copy the
url
property.
Configure the Chat app in the Google Cloud console
This section shows how to configure the Chat API in the Google Cloud console with information about your Chat app, including the Chat app's name and the trigger URL of the Chat app's Cloud Function to which it sends Chat interaction events.
In the Google Cloud console, click Menu > More products > Google Workspace > Product Library > Google Chat API > Manage > Configuration.
In App name, type
AI knowledge assistant
.In Avatar URL, type
https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/live_help/default/24px.svg
.In Description, type
Answers questions with AI
.Click the Enable Interactive features toggle to the on position.
Under Functionality, select Join spaces and group conversations.
Under Connection settings, select HTTP endpoint URL.
In HTTP endpoint URL, paste the Trigger URL from the
app
Cloud Function formatted ashttps://
REGION-
PROJECT_ID.cloudfunctions.net/app
where REGION is the Cloud Function's region, likeus-central1
and PROJECT_ID is the Project ID of the Cloud project you created.Under Visibility, select Make this Chat app available to specific people and groups in your Workspace domain and enter your email address.
Optionally, under Logs, select Log errors to Logging.
Click Save. A configuration saved message appears, meaning the Chat app is ready to test.
Test the Chat app
Test the AI knowledge assistant Chat app in a Chat space with messages by asking questions that the AI knowledge assistant Chat app can answer.
Here's a few ways to test the AI knowledge assistant Chat app:
- Add the AI knowledge assistant Chat app to an existing Chat space and ask questions that are relevant to that space.
- Create a Chat space and post a few messages to use as
a data source. Messages can be sourced from
Gemini with a prompt like
Answer 20 common onboarding questions employees ask their teams.
Or, you can paste a few paragraphs from the develop with Chat overview guide and then ask questions about it.
For this tutorial, lets create a Chat space and paste a few paragraphs from the develop with Chat overview guide.
Open Google Chat.
Create a Chat space:
Click > Create a space.
New ChatIn Space name, type
Testing AI knowledge assistant app
.Under What is this space for?, select Collaboration.
Under Access settings, choose who can access the space.
Click Create.
Add messages to use as a data source:
In a web browser, visit the develop with Chat overview guide.
Copy and paste the guide's content into the Chat space you created.
Add the AI knowledge assistant Chat app:
In the message compose bar, type
@AI knowledge assistant
and in the suggestion menu that appears, select the AI knowledge assistant Chat app, and pressenter
.A message appears asking if you want to add the AI knowledge assistant Chat app to the space. Click Add to space.
If this is the first time you add the Chat app to a space, you must configure authentication and authorization for the Chat app:
- Click Configure.
- A new browser window or tab opens asking you to choose a Google Account. Choose the account you are testing with.
- Review the permissions that the AI knowledge assistant Chat app requests. To grant them, click Allow.
- A message that says
You may close this page now.
appears. Close the browser window or tab and return to the Chat space.
Ask a question:
In the message compose bar, type a question like
What are Google Chat apps?
The AI knowledge assistant Chat app answers.
Optionally, if the answer isn't accurate or sufficient, to help the AI's conversation history improve, click
Get help. The AI knowledge assistant Chat app mentions a space manager and asks them to answer the question. Next time, the AI knowledge assistant Chat app will know the answer!
Considerations, alternate architecture choices, and next steps
This section reviews other ways the AI knowledge assistant Chat app can be built.
Firestore, Cloud Storage, or calling List Messages in Chat API
This tutorial recommends storing Chat space data like
messages in a Firestore database because it improves performance compared
with calling the list
method on the Message
resource with Chat API every time the
Chat app answers a question. Further, calling
list messages
repeatedly can cause the
Chat app to hit API quota limits.
However, if a Chat space's conversation history becomes too long then using Firestore can become costly.
Cloud Storage is an alternative to Firestore. Each space the AI knowledge assistant Chat app is active in gets its own object, and each object is a text file that contains all the messages in the space. The advantage of this approach is that the full contents of the text file can be fed to Vertex AI with Gemini at once, but the drawback is that it takes more work to update the conversation history because you can't append to an object in Cloud Storage, only replace it. This approach doesn't make sense if you regularly update the message history, but it would be a good choice if you batch-update the message history periodically, say once per week.
Troubleshoot
When a Google Chat app or card returns an error, the Chat interface surfaces a message saying "Something went wrong." or "Unable to process your request." Sometimes the Chat UI doesn't display any error message, but the Chat app or card produces an unexpected result; for example, a card message might not appear.
Although an error message might not display in the Chat UI, descriptive error messages and log data are available to help you fix errors when error logging for Chat apps is turned on. For help viewing, debugging, and fixing errors, see Troubleshoot and fix Google Chat errors.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used in this tutorial, we recommend that you delete the Cloud project.
- In the Google Cloud console, go to the Manage resources page. Click Menu > IAM & Admin > Manage Resources.
- In the project list, select the project you want to delete and then click Delete .
- In the dialog, type the project ID and then click Shut down to delete the project.
Related topics
- Manage projects with Google Chat, Vertex AI, and Firestore
- Respond to incidents with Google Chat, Vertex AI, and Apps Script