Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trang này giải thích cách định cấu hình và triển khai một ứng dụng Google Chat dưới dạng tiện ích bổ sung cho Google Workspace.
Để triển khai và kiểm thử một tiện ích bổ sung Google Workspace mở rộng Chat, bạn phải bật và định cấu hình một ứng dụng Chat bằng Google Chat API. Chế độ cài đặt cấu hình Chat API là nơi bạn chỉ định tất cả thông tin chi tiết về ứng dụng Chat, bao gồm cả tên, hình đại diện, việc triển khai và các tính năng tương tác mà bạn muốn sử dụng.
Chọn tên hiển thị, hình đại diện và nội dung mô tả cho ứng dụng Chat
Tên, hình đại diện và nội dung mô tả của ứng dụng Chat sẽ xuất hiện với người dùng trong giao diện người dùng Chat. Để tương tác với các ứng dụng Chat, người dùng sẽ thấy hoặc sử dụng thông tin này theo những cách sau:
@đề cập đến ứng dụng Chat để thêm ứng dụng này vào một không gian hoặc gửi tin nhắn cho ứng dụng.
Tìm và bắt đầu một tin nhắn trực tiếp bằng ứng dụng Chat. Trong trình đơn Ứng dụng, tin nhắn trực tiếp sẽ hiển thị tên và hình đại diện của ứng dụng Chat.
Trên thanh soạn tin, người dùng có thể duyệt xem các ứng dụng Chat và xem tên, hình đại diện cũng như nội dung mô tả của các ứng dụng đó.
Trước khi định cấu hình ứng dụng Chat, bạn phải chuẩn bị những thông tin sau:
Trường
Mô tả
Định dạng
Tên ứng dụng
Tên hiển thị của ứng dụng Chat.
Tối đa 25 ký tự chữ và số
URL hình đại diện
Hình ảnh xuất hiện dưới dạng hình đại diện của ứng dụng Chat.
Một URL HTTPS trỏ đến hình ảnh đồ hoạ vuông (PNG hoặc JPEG).
Kích thước đề xuất là 256 x 256 pixel trở lên.
Mô tả
Nội dung mô tả ngắn gọn về mục đích của ứng dụng Chat.
Tối đa 40 ký tự bao gồm chữ và số
Trong phần sau, bạn sẽ chỉ định thông tin này trong phần cài đặt cấu hình của Chat API.
Định cấu hình ứng dụng Chat trong Google Cloud Console
Trong Google Cloud Console, bạn định cấu hình thông tin chi tiết về ứng dụng Chat mà người dùng nhìn thấy trong Chat, bao gồm cả tên hiển thị, hình đại diện và nội dung mô tả. Những thông tin này chỉ xuất hiện trong Chat. Để xuất bản ứng dụng Chat lên Marketplace, bạn cũng phải chỉ định thông tin chi tiết xuất hiện trong trang thông tin trên Marketplace của ứng dụng Chat.
Khi bạn có thông tin chi tiết về ứng dụng Chat, hãy mở dự án trên Cloud rồi định cấu hình Chat API:
Trong Google Cloud Console, hãy chuyển đến trang Chat API rồi nhấp vào trang Configuration (Cấu hình):
Trong mục Thông tin ứng dụng, hãy điền thông tin vào các trường Tên ứng dụng, URL hình đại diện và Nội dung mô tả.
Trong mục Tính năng tương tác, hãy nhấp vào Bật tính năng tương tác để chuyển sang vị trí bật rồi hoàn tất các bước sau:
Trong phần Chức năng, hãy chọn Tham gia không gian và cuộc trò chuyện nhóm để cho phép cài đặt và sử dụng ứng dụng Chat.
Theo mặc định, người dùng có thể cài đặt và nhắn tin bằng ứng dụng Chat trong một không gian riêng giữa người dùng và ứng dụng Chat. Người dùng cũng có thể thêm và tương tác với ứng dụng Chat trong không gian có nhiều người.
Trong mục Connection settings (Chế độ cài đặt kết nối), hãy chọn cấu trúc mà bạn muốn dùng để nhận các đối tượng sự kiện từ Chat:
Để sử dụng dịch vụ HTTP, hãy chọn URL điểm cuối HTTP và cung cấp một URL.
Để sử dụng một dự án Google Apps Script, hãy chọn Apps Script rồi cung cấp một mã nhận dạng triển khai cho dự án đó.
Không bắt buộc: Để nhận các đối tượng sự kiện cho nhiều điểm cuối hoặc hàm, hãy chuyển đến phần Connection settings (Cài đặt kết nối) >Triggers (Trình kích hoạt) rồi cung cấp hoặc cập nhật các hàm gọi lại cho Chat triggers (Trình kích hoạt trò chuyện) sau đây:
Được thêm vào không gian: Người dùng thêm ứng dụng Chat vào cuộc trò chuyện nhóm hoặc không gian, hoặc cài đặt ứng dụng Chat cho tin nhắn 1:1.
Tin nhắn: Người dùng gửi tin nhắn đến ứng dụng Chat. Ví dụ: gửi tin nhắn trực tiếp đến ứng dụng Chat hoặc @đề cập đến ứng dụng Chat trong một không gian có nhiều người.
Đã xoá khỏi không gian: Người dùng gỡ cài đặt hoặc xoá ứng dụng Chat khỏi một không gian.
Lệnh ứng dụng: Người dùng sử dụng lệnh nhanh hoặc lệnh dấu gạch chéo trong ứng dụng Chat.
Trong mục Chế độ hiển thị, hãy chỉ định email của bạn để có thể cài đặt và kiểm thử ứng dụng Chat trước khi xuất bản lên Google Workspace Marketplace. Bạn có thể chỉ định tối đa 5 cá nhân hoặc một hoặc nhiều Nhóm Google trong tổ chức Google Workspace của mình.
Không bắt buộc: Trong mục Nhật ký, hãy chọn hộp đánh dấu Ghi lỗi vào Logging để sử dụng Google Cloud Logging. Để biết thêm thông tin, hãy xem phần Truy vấn nhật ký lỗi cho ứng dụng Chat trong tài liệu về Chat API.
Nhấp vào Lưu.
Sau khi bạn lưu cấu hình, bất kỳ người nào mà bạn chỉ định trong chế độ cài đặt Chế độ hiển thị của Chat API đều có thể cài đặt, kiểm thử hoặc sử dụng ứng dụng Chat. Để bắt đầu kiểm thử và gỡ lỗi ứng dụng Chat, hãy xem phần Kiểm thử các tính năng tương tác cho ứng dụng Google Chat trong tài liệu về Chat API.
Những điều cần cân nhắc đối với các tiện ích bổ sung hiện có của Google Workspace
Các ứng dụng trò chuyện yêu cầu một cấu hình khác so với các tiện ích bổ sung của Google Workspace mở rộng các ứng dụng khác của Google Workspace.
Nếu tiện ích bổ sung của bạn mở rộng các ứng dụng khác của Google Workspace, hãy cân nhắc các yêu cầu sau để định cấu hình ứng dụng Chat:
Cả cá nhân và quản trị viên Google Workspace đều phải có thể cài đặt tiện ích bổ sung của bạn từ Marketplace. Bạn định cấu hình các chế độ cài đặt này trong Google Workspace Marketplace SDK.
Các ứng dụng nhắn tin không sử dụng tên và biểu trưng mà bạn định cấu hình cho các ứng dụng khác của Google Workspace trong đối tượng addons.common của tệp kê khai.
Đối với những tiện ích bổ sung được xuất bản lên Google Workspace Marketplace, bạn không thể lưu bản nháp của bất kỳ thay đổi nào đối với chế độ cài đặt cấu hình Google Chat API.
Sau khi bạn cập nhật và lưu chế độ cài đặt cấu hình Chat API, ứng dụng Chat đã cập nhật sẽ có sẵn cho tất cả người dùng hiện tại. Để cập nhật trang thông tin của bạn trên Marketplace, bạn có thể tạo bản nháp trước khi gửi bất kỳ thay đổi nào.
Nếu bạn tạo tiện ích bổ sung bằng Apps Script:
Bạn phải sử dụng cùng một mã nhận dạng triển khai Apps Script mà bạn dùng cho phần còn lại của cấu hình tiện ích bổ sung.
Nếu bạn tạo tiện ích bổ sung bằng dịch vụ HTTP, hãy bỏ qua mọi thông tin chi tiết về cấu hình ứng dụng Chat trong tệp kê khai và các hoạt động triển khai mà bạn tạo bằng API tiện ích bổ sung của Google Workspace. Các hoạt động triển khai HTTP mà bạn chỉ định trong Google Workspace Marketplace SDK chỉ được dùng cho các ứng dụng khác trên Google Workspace.
Chủ đề có liên quan
Để quản lý quyền truy cập vào Chat API, hãy xem phần Định cấu hình Google Chat API trong tài liệu về Google Chat API.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-04 UTC."],[[["\u003cp\u003eThis guide explains how to set up a Google Chat app as a Google Workspace add-on using either Apps Script or an HTTP service.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need a Google Workspace account, a Google Cloud project, and necessary API configurations to get started.\u003c/p\u003e\n"],["\u003cp\u003eThe setup involves choosing a display name, avatar, and description for your app, and configuring its interactive features in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eFor existing Google Workspace add-ons, specific considerations apply when integrating Chat app functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is part of the Google Workspace Developer Preview Program, granting early access before public release.\u003c/p\u003e\n"]]],["To configure a Chat app, use the Google Cloud console to access the Chat API page. Input the app's name, avatar URL, and description. Enable interactive features, choosing to receive 1:1 messages or join group conversations. Select either an HTTP endpoint URL or an Apps Script deployment ID for connection settings. Optionally, set triggers, add quick/slash commands, and specify visibility. Save configurations; users listed in \"Visibility\" can then test the Chat app.\n"],null,["# Configure a Google Chat app\n\nThis page explains how to configure and deploy a Google Chat app\nas a Google Workspace add-on.\n\nTo deploy and test a Google Workspace add-on that extends Chat,\nyou must enable and configure a Chat app using the\nGoogle Chat API. The Chat API configuration settings are where you\nspecify all the details about the Chat app, including\nthe name, avatar, deployment, and interactive features that you want to use.\n| **Note:** This page explains how to configure a Chat app using Apps Script or an HTTP service. [Dialogflow](/workspace/chat/build-dialogflow-chat-app-natural-language) and [Pub/Sub](/workspace/chat/quickstart/pub-sub) are unavailable. For details, see [Limitations and known issues](/workspace/add-ons/chat#limitations-known-issues).\n\nPrerequisites\n-------------\n\n- A Business or Enterprise [Google Workspace](https://support.google.com/a/answer/6043576) account with access to [Google Chat](https://workspace.google.com/products/chat/).\n- A Google Cloud project. To create one, see\n [Create a Google Cloud project](/workspace/guides/create-project).\n\n- [Configure the OAuth consent screen](/workspace/guides/configure-oauth-consent).\n- [Enable the Google Chat API](/workspace/guides/enable-apis).\n\nChoose a display name, avatar, and description for your Chat app\n----------------------------------------------------------------\n\nThe Chat app's name, avatar, and description are\ndisplayed to users in the Chat UI. To interact with\nChat apps, users see or use this information in the following\nways:\n\n- @mention the Chat app to add it to a space or send it a message.\n- Find and start a direct message with the Chat app. In the **Apps** menu, direct messages display the Chat app's name and avatar.\n- From the compose bar, users can browse Chat apps and see their name, avatar, and description.\n\nBefore you configure a Chat app, you must prepare the\nfollowing information:\n\n| Field | Description | Format |\n|-------------|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| App name | The display name for the Chat app. | Up to 25 alphanumeric characters |\n| Avatar URL | The image that displays as your Chat app's avatar. | An HTTPS URL pointing to a square graphics image (PNG or JPEG). Recommended size is 256 by 256 pixels or more. |\n| Description | A brief description of the purpose of the Chat app. | Up to 40 alphanumeric characters |\n\nIn the following section, you specify this information in the configurations\nsettings in the Chat API.\n\nConfigure your Chat app in the Google Cloud console\n---------------------------------------------------\n\nIn the Google Cloud console, you configure the details about your\nChat app that appear to users in Chat,\nincluding a display name, avatar, and description. These details only appear\nin Chat. To publish your Chat app to the\nMarketplace, you must also specify the details that\nappear in your Chat app's\n[Marketplace listing](/workspace/marketplace/create-listing).\n\nWhen you have your Chat app details, open your\nCloud project and configure the Chat API:\n\n1. In the Google Cloud console, go to the Chat API page and click the\n **Configuration** page:\n\n [Go to the Chat API Configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)\n2. Under **Application info** , fill out the **App name** , **Avatar URL** ,\n and **Description** fields.\n\n3. Under **Interactive features** , click the **Enable interactive features**\n to the on position and complete the following:\n\n 1. Under **Functionality** , select **Join spaces and group conversations**\n to make your Chat app available to install and use.\n\n By default, Users can install and message with the\n Chat app in a dedicated space between\n the user and Chat app. Users can also add and interact\n with the Chat app in spaces with multiple\n people.\n 2. Under **Connection settings** , select the architecture that you want to\n use to receive\n [event objects from Chat](/workspace/add-ons/chat/build#event-objects):\n\n - To use an HTTP service, select **HTTP endpoint URL** and provide a URL.\n - To use a Google Apps Script project, select **Apps Script** and provide a [deployment ID](/apps-script/concepts/deployments) for the project.\n\n | **Warning:** If an Apps Script deployment ID is already populated, the Cloud project is connected to an existing Google Workspace add-on. If you update the deployment ID in the Chat API, the deployment ID is updated for your add-on and could affect your listing in the Google Workspace Marketplace. To review your add-on configuration, see [Configure your app in the Google Workspace Marketplace SDK](/workspace/marketplace/enable-configure-sdk) in the Google Workspace Marketplace documentation.\n 3. Optional: To receive event objects to more than one endpoint or\n function, go to **Connection settings**\n \\\u003e **Triggers** and provide or\n update the callback functions for the following\n [Chat triggers](/workspace/add-ons/chat/build#triggers):\n\n | **Note:** For Apps Script, if you don't update the triggers, you must use the corresponding callback functions that are populated in this section (such as `onMessage`, `onAddedToSpace`, and `onRemovedFromSpace`).\n - **Added to space**: A user adds the Chat app to a group conversation or space, or installs the Chat app for 1:1 messages.\n - **Message**: A user sends a message to the Chat app. For example, sends a direct message to the Chat app or @mentions the Chat app in a space with multiple people.\n - **Removed from space**: A user uninstalls or removes the Chat app from a space.\n - **App command**: A user uses a quick command or slash command from the Chat app.\n 4. Optional: Add other interactive features such as\n [quick commands](/workspace/add-ons/chat/quick-commands),\n [slash commands](/workspace/add-ons/chat/slash-commands),\n or [link previews](/workspace/add-ons/chat/preview-links).\n\n 5. Under **Visibility** , specify your email so that you can\n [install and test the Chat app](/workspace/chat/test-interactive-features)\n before you publish to the Google Workspace Marketplace. You can specify\n up to five individuals, or one or more Google Groups from your\n Google Workspace organization.\n\n4. Optional: Under **Logs** , select the **Log errors to Logging** checkbox to\n use Google Cloud Logging. For more information, see\n [Query error logs for Chat apps](/workspace/chat/query-logs)\n in the Chat API documentation.\n\n5. Click **Save**.\n\nAfter you save the configuration, anyone that you specified in the\nChat API's **Visibility** setting can install, test, or use the\nChat app. To start testing and debugging your\nChat app, see\n[Test interactive features for Google Chat apps](/workspace/chat/test-interactive-features)\nin the Chat API documentation.\n\nConsiderations for existing Google Workspace add-ons\n----------------------------------------------------\n\nChat apps require a different configuration compared to\nGoogle Workspace add-ons that extend other Google Workspace applications.\nIf your add-on extends other\nGoogle Workspace applications, consider the following requirements\nfor configuring the Chat app:\n\n- Both individuals and Google Workspace administrators must be able to install your add-on from the Marketplace. You configure these installation settings in the Google Workspace Marketplace SDK.\n- Chat apps don't use the name and logo that you configure for other Google Workspace applications in the `addons.common` object of the [manifest](/workspace/add-ons/concepts/workspace-manifests).\n- For add-ons that are published to the Google Workspace Marketplace, you can't save a draft of any changes to the [Google Chat API configuration settings](/workspace/add-ons/chat/configure). After you update and save the Chat API configuration settings, the updated Chat app is available to all existing users. To update your Marketplace listing, you can [create a draft](/workspace/marketplace/manage-app-listing#draft-app-listing) before submitting any changes.\n- If you built your add-on using\n Apps Script:\n\n - You must use the same Apps Script deployment ID that you use for the rest of your add-on configuration.\n - You can't use the Apps Script editor to install [test deployments](/workspace/add-ons/how-tos/testing-workspace-addons#install_an_unpublished) in Chat. Instead, you must [install them directly from the\n Chat UI](/workspace/chat/test-interactive-features).\n- If you built your add-on using an HTTP service,\n omit any Chat app configuration details in the\n manifest and deployments that you create using the Google Workspace add-ons API. The\n HTTP deployments that you specify in the Google Workspace Marketplace SDK are\n only used for other Google Workspace applications.\n\nRelated topics\n--------------\n\n- To manage access to the Chat API, see [Configure the Google Chat API](/workspace/chat/configure-chat-api#grant-access) in the Google Chat API documentation.\n- [Test interactive features for Google Chat apps](/workspace/chat/test-interactive-features)"]]