This section features samples that explain how to build and deploy different kinds of Chat apps.
Get started with a quickstart
If you've never built a Chat app, you can get started by completing a quickstart. Quickstarts explain how to set up and run a basic sample. To get started with the Google Chat API, you can choose from two types of quickstarts:
- API quickstarts: Set up your environment by building a Chat app that calls the Chat API to perform tasks on your behalf, such as send a message or return a list of spaces that you're a member of.
- Interactive quickstarts: Configure the Chat API and create a basic Chat app that you can add to spaces and message with.
API quickstarts
API quickstarts use user authentication to call the Chat API, which means they perform an action as an authenticated Chat user. In this case, the quickstarts help you call the Chat API as yourself. Unlike the interactive quickstarts, you don't need to install or interact with the Chat app in Chat spaces.
The API quickstarts are offered in the following languages:
For all other programming languages, view and install our client libraries to get started with the Chat API.
Interactive quickstarts
Choose from the following interactive quickstarts based on how you want to build:
- Google Apps Script, a cloud-based, low-code development platform based in JavaScript.
- HTTP service with Google Cloud Functions.
- Google Cloud Dialogflow CX, a natural language platform for automated conversations and dynamic responses.
- Google Cloud Pub/Sub, a real-time messaging service that lets you build behind a firewall.
- AppSheet, a no-code development platform for building apps in Google Workspace organizations.
After you've completed a quickstart, you can continue to build so that your Chat app can do the following:
- Respond to users using slash commands, dialogs, link previews, and other interactive features.
- Perform tasks proactively or independently, such as send a message whenever something changes in an external service. To perform tasks that aren't initiated by a user, you must set up app authentication so that the Chat app can authenticate and call the Chat API. For details, see Authenticate as a Google Chat app.
Explore more complete samples
After you try a quickstart, explore Chat app samples that use more features and services. The following table lists some of our Chat app samples based on the format, technologies, architecture, and interactive features that they use:
- Format: The format for the sample, including:
- Tutorials provide step-by-step instructions from start to finish, and assume you have nothing set up beyond a Google Cloud project.
- Codelabs are guided walkthroughs of one or more Google products and usually presented at an event and published later for you to try at home.
- GitHub code samples are published to the Google Chat GitHub repository with some basic instructions on how to use them. Often times, these samples are also used in documentation.
- Technologies: The Google Workspace and Google Cloud products, services, or APIs used in the sample.
- Architecture: The Chat app architecture or service used in the sample.
- See which interactive features the sample uses:
- Slash commands: Responds to
commands from the user, such as
/about.
- Dialogs: Opens interfaces in a new window where users can enter and submit information.
- Link previews: Attaches card-based interfaces to messages that contain links from third-party services, so that users can preview or update information from the link.
- Homepages: Displays a Home tab in messages with the Chat app where users can learn about or use its features.
- Interactive widgets: Uses widgets that prompt users to click or interact with messages and other types of user interfaces, including buttons, checkboxes, and text inputs.
- Events: Responds to activities in Chat, such as new messages or members in a space.
- Slash commands: Responds to
commands from the user, such as
Sample | Description | Format | Technologies | Architecture | Slash commands | Dialogs | Link previews | Homepages | Interactive widgets | Events |
---|---|---|---|---|---|---|---|---|---|---|
AI Knowledge Assistant | Use Gemini to answer questions based on past messages in a Chat short. | Tutorial |
|
|
||||||
Incident Management | Respond to incidents in Chat and generate an AI-based summary of the resolution in Google Docs. | Tutorial |
|
|
||||||
Manage projects | Help users create, update, and complete projects in Chat. | Tutorial |
|
|
||||||
Build apps for Google with Gemini | From Google I/O 2024, build various Chat apps with Gemini features. | Codelab |
|
|
||||||
Interactive poll | Build a Chat app that lets users create polls and display total votes. Explains how to build the Chat app using the Google Cloud Shell Editor. | Codelab |
|
|
Next steps
- Google Chat repository on GitHub
- Identify your users' needs
- Define all user journeys
- Choose an app architecture