Once you’ve created a chatbot, you can publish it so that it’s available to select people or groups, everyone in your domain, or any Google Chat user. Users can start a direct message with the bot or add it to a room by choosing it from the proposed recipient list as shown below.
Users can also narrow the proposed recipient list by @mentioning the bot by name. For example, if you publish a bot called “schedulerbot” and a user in your domain types “@sch”, then Google Chat will propose your bot as one of the autocomplete options.
Share your bot with others
Depending on your intended audience and domain settings, you might need to perform the additional steps listed below.
Share your bot only within your domain
Unless your administrator must manually add trusted bots, your bot becomes available to the users you specify in the Chat API when you save the bot configuration.
If your administrator must manually add trusted bots, perform the steps below:
- Follow the steps to publish your bot privately to your domain using the Google Workspace Marketplace SDK. See Publish your bot with the Google Workspace Marketplace SDK.
- Have your administrator add your bot to the domain’s allowlist.
Make your bot public
After you configure the Chat API, follow the steps to publish publicly using the Google Workspace Marketplace SDK. See Publish your bot with the Google Workspace Marketplace SDK.
Enable the Google Chat API (formerly Hangouts Chat API)
Set up a project for your bot in the Google API Console and enable the Google Chat API.
- Use the button below to create a new project (or select an existing one) and
add a service account to it. Give the service account the Project Owner
Enable the API
- Save the downloaded JSON key. Your bot can use this key to authenticate messages that it sends to spaces asynchronously.
- Open your project in the API Console. In the list of APIs, click Hangouts Chat API.
- Select the Configuration tab and enter the information for the bot, as described below.
When you save the bot configuration, your bot becomes available to the specified users in your domain.
About bot configuration
|Bot name||The name that people use when interacting with your bot.|
|Avatar URL||An HTTPS URL pointing to a square graphics image (e.g. PNG or JPEG), at least 128x128, that will appear as the avatar for your bot.|
|Description||A description of the bot's functionality which appears below your bot's name.|
|Functionality||A set of fields that determine what events can trigger the bot:
|Connection settings||The endpoint for the bot, which is one of the following:
|Slash commands||Commands that can be surfaced to users within Google Chat. Allows users to see core actions for your bot within Google Chat, and choose a specific action they wish to interact with.|
|Permissions||The developer-specified permissions for the bot. You can give install permissions to all members of your domain, or just to select individuals or groups. NOTE: If your administrator requires bots to be added to the domain's allowlist, these permissions won't take effect until you publish your bot to your domain using the Google Workspace Marketplace SDK and have it added to the allowlist by your administrator.|
Disable your bot
After you save the configuration page, a Bot Status field appears. This field lets you control whether the bot is Live or Disabled.
Grant bot configuration permissions
You can grant specific users access to the bot configuration page. To do this, use the Chat Bots Owner and Chat Bots Viewer IAM roles. Users with these roles can't navigate to the bot configuration page via the APIs & Services dashboard, but can access the configuration page by navigating to the console for their project as follows:
Publish your bot with the Google Workspace Marketplace SDK
Use the Google Workspace Marketplace SDK to:
- Publish your bot publicly and let any Google Chat user add your Chat bot to a space.
- Publish your bot to your domain if your administrator needs to add trusted chatbots to the domain’s allowlist.
Before you publish your bot using the Google Workspace Marketplace SDK, follow these steps:
- Test your chatbot. Make sure your bot is fully functional and not a work in progress.
- Review the publication requirements and verify that your bot satisfies all of them. See Areas of review.
- Record your bot’s version number--you need this to configure the Google Workspace Marketplace SDK.
When you’re ready to publish, see Overview: Publish an app.