To create your first Chat app with AppSheet, perform the following steps:
- Copy the sample app.
- Enable Chat apps with AppSheet.
- Configure your Chat app using automatic or manual configuration.
- Test your Chat app.
Copy the sample app
To copy the sample app:
- Sign in to AppSheet.
The My Apps page is displayed. - Click Templates in the left navigation.
The list of app templates is displayed. - Locate the Simple Inventory app template and click Copy.
- Optionally, edit the name of the app and choose a category, or just use the default values.
- Click Copy app.
The app template is copied and your new app is created and opened in the AppSheet app editor. The Learning Center is displayed by default.
Enable Chat apps with AppSheet
- In the app editor, click Chat apps in the left navigation.
- Click Create.
After a few minutes, the Enable section expands.Note: Review the Google Workspace Marketplace Developer Agreement and the Google APIs Terms of Servicebefore proceeding
Next, you'll configure the Chat app.
Configure the Chat app
Configure the Chat app using automatic or manual configuration as described in the following sections. With one-click automatic configuration, Chat apps are only available to users in the organization in which they were created. With manual configuration, you can create Chat apps that are available to users inside your organization or that can be made available to external users. For more guidance on choosing the configuration mode, see Choose the configuration mode.
Automatic configuration is set by default.
Create the Chat app using automatic configuration
To configure the Chat app using automatic configuration:
- In the Enable section, click Next to create a Google Chat app.
- In the Customize section, leave the First message section set to the default configuration.
All primary menu views will be included in the Chat app menu. - Leave the Smart "/search" command turned on to allow users to search for Chat app views using simple phrases.
- Add the following actions (slash commands) to your Chat app:
- In the app editor, expand the Customize section (if it's not already expanded).
- Click + Action.
- Click Slash command: Open app view in the drop-down.
- Enter the following information:
Field Value App View Inventory Log Name /inventory-log Description Display a log of inventory - Click + Action.
- Click Slash command: Open app view in the drop-down.
- Enter the following information:
Field Value App View Inventory_Form Name /inventory-form Description Add inventory
- Click Next.
The Test section expands. You need to deploy your Chat app before you can test it. - Deploy the app:
- Click Go to deployment settings in the top banner.
- In the Deployment Check section, click Move app to deployed state.
- Share the app with the test accounts.
- Go to Test your Chat app.
Configure the Chat app using manual configuration
To configure the Chat app using manual configuration:
- In the Enable section, select More > Switch to manual configuration in the Chat apps header.
.
The Enable section is refreshed with the steps for manual configuration. - To create a new Google Cloud project:
- Click Google Cloud Console > Projects in the app editor to open the New Project page.
- Enter a name for your project.
This name is internal and isn't displayed in your Chat app. - Set your billing account, organization, and location.
For more information, see Creating a project. - Do not select the Create Googleplex internal App Engine project option.
- Click Create.
- Select Cloud overview > Dashboard in the navigation menu to display the project dashboard.
- Select the Google Cloud project in the project drop-down (if it's not already selected) and copy the Project number that is displayed in the Project info card.
- Return to the app editor and paste the project number in the Google Project Number field.
- Click Next.
Your app in now linked to the Google Cloud project. The Enable the Google Chat API section expands. - Enable the Google Chat API:
- In the Enable the Google Chat API section, click Google Cloud Console > Google Chat API to open the Google Chat API page in the Google Cloud Console.
- In the console, click Enable on the Google Chat API page for the connected Google Cloud project.
- Return to the app editor and click Next.
The Customize section expands.
- In the Customize section, leave the First message section set to the default configuration. All primary menu views will be included in the Chat app menu.
- Add the following actions (slash commands) to your Chat app:
- Click + New action.
- Click Slash command: Open app view in the drop-down.
- Enter the following information:
Field Value App View Inventory Log Name /inventory-log Description Display a log of inventory - Click + New action.
- Click Slash command: Open app view in the drop-down.
- Enter the following information:
Field Value App View Inventory_Form Name /inventory-form Description Add inventory You'll complete the configuration of the slash commands later.
- Click Next.
The Configure the Google Chat API section expands. - To configure the Chat API:
- In the Configure the Google Chat API section, click Google Cloud Console > Google Chat API > Configuration to open the Configuration tab for the Google Chat API in the Google Cloud Console.
- To complete the fields under Application info, including the App name, Avatar URL, and Description, copy the information from the app editor and paste it in the equivalent field in the console, as shown:
- In the console, make sure Enable interactive features is turned on.
- Turn on (select) Receive 1:1 messages and Join spaces and group conversations under Functionality.
- In the console, under Connection settings select App URL.
- To complete the App URL field under Connection settings, copy the App URL field from the app editor and paste it in the equivalent field in the console, as shown:
- Add slash commands to your Chat app:
- In the console, click Add a new slash command under Slash commands.
- To add the /inventory-log slash command, complete the fields under New slash command, including the Name, Command Id, and Description, by copying the information from the app editor in Slash Command 1 section of the Configure the Google Chat API section and pasting it in the equivalent field in the console.
- Enable the Opens a dialog option.
- Click Done.
- Repeat to add the /inventory-form slash command.
- Enable the Opens a dialog option.
- Click Done.
- Configure who can access the Chat app:
- In the console, under Visibility select Make this Chat app available to specific people and groups in your domain and add the email addresses for individual accounts.
For initial test purposes, you may just add your own account.
- Click Save.
- In the console, under Visibility select Make this Chat app available to specific people and groups in your domain and add the email addresses for individual accounts.
- In the app editor, click Next.
- Click Next to skip the optional step, Grant IAM access to run automations. This step is not required for this tutorial.
The Test section expands. You need to deploy your Chat app before you can test it. - Deploy the app:
- Click Go to deployment settings in the top banner.
- In the Deployment Check section, click Move app to deployed state.
- Share the app with the test accounts.
Test your Chat app
To test your Chat app:
- Open Google Chat.
- Click + next to Chat or Spaces.
- Click Find apps in the drop-down.
- Enter Simple Inventory in the search field.
- Click the Simple Inventory app in the list.
The following dialog displays:
- Do one of the following: The Chat app interface appears as follows:
Notice that the Items and Levels views are targeted to open in the desktop UI because they use views types that are not yet supported for Chat apps with AppSheet. See Summary of features supported for Chat apps with AppSheet.- Click Add to space to add the Chat app to a space, enter the space name, and click Add.
- Click Chat to start a direct message (DM). Type hello (or any string not starting with /) to display the Chat app interface.
- Click Inventory Log to display the complete inventory log in the app dialog.
Click through the inventory details, as desired, and click X to close the app dialog. - Click Items and notice that it opens in a separate desktop browser window.
The Items view is a card view type, which is not supported in Google Chat. See Summary of features supported for Chat apps with AppSheet. - Enter / in Google Chat.
The list of slash commands is displayed.
- Click /inventory-form in the list, then click Enter.
The Inventory form is open in the app dialog. - Enter a new inventory log and click Save.
Congratulations! You have successfully created your first Chat app with AppSheet!