This is a preview release of Gemini in AppSheet Solutions. See Track and manage feature releases. Preview offerings are intended for use in test environments only. This feature is not recommended for use in production apps. For questions or assistance with this feature, contact AppSheet Support.
Gemini in AppSheet Solutions (preview) requires an AppSheet Enterprise Plus account.
Imagine you are the owner of a car dealership and you need to frequently update your sales inventory. Using AI in automation, the process can be greatly simplified for the end user. Here’s what the experience could be for them:
- Take a photo of the new car on a mobile device.
- Upload the image to your AppSheet app.
Using AI, AppSheet extracts data from the photo, such as car make, model, color, and year.
In this Quick start, you'll build an automation that uses AI to update the inventory at a car dealership. Specifically, you'll create an AppSheet database and use it to create an app, then build an automation using AI to extract information from a car photo and categorize the car by body style.
To build an automation to extract information from a car photo and categorize the car by body style, do the following steps:
- Create an AppSheet database
- Create an app using the AppSheet database
- Turn on preview features in AppSheet
- Build an automation to extract information from a photo using AI
- Run the automation in the app preview
- Add a step to categorize cars by body style using AI
- Test the step in your automation
Before you begin: Turn on Gemini in AppSheet Solutions
Step 1: Create an AppSheet database
First, you'll create an AppSheet database and add the columns you need to store information about the car, such as make, model, year, and so on.
To create an AppSheet database, do the following:
- Sign in to AppSheet.
The My Apps page is displayed. - Select Create > Database > New database.
A new AppSheet database is created and opened in the database editor - Click within the name, Untitled database, and change the name of the database to: Car inventory
- Change the name of the Table 1 table:
- Position your cursor in the Table 1 tab and select More
> Table settings.
- Change the table name to: Car inventory
- Leave all other fields set to the default values.
- Click Save.
- Position your cursor in the Table 1 tab and select More
- Delete the dummy rows in the table, as follows:
- Click in column 1 and drag the cursor to highlight all rows in the table.
- Right-click on the selected rows and select Delete rows.
A confirmation dialog displays to confirm the delete operation. - Click OK to confirm the operation.
- Click in column 1 and drag the cursor to highlight all rows in the table.
- Edit the columns in the table as indicated in the following table:
Column Steps Title Do the following:
- Position your cursor in the Title column header and select More
> Edit column
- Change the Name field to Make and click Save.
Assignee
Do the following:
- Position your cursor in the Assignee column header and select More
> Edit column.
- Change the Name field to Model.
-
Change the Type field to Name.
This indicates that the content is a proper name. Alternatively, you could set this to Text. - Click Save.
Status
Do the following:
- In the Status column header, select More
> Edit column.
- Change the Name field to Color.
- Leave the Type field set to Enum and the Item type field set to Dropdown.
- Edit the three Enum options as follows:
- Double-click in the Not started option field and change the name to White.
- Double-click in the In Progress option field and change the name to Green. Then, click the color setting to the left of the name and choose the green color block.
- Double-click in the Complete option field and change the name to Yellow. Then, click the color setting to the left of the name and choose the yellow color block.
- Add more Enum color options, as required, and an Other option to account for colors that aren't defined:
- Click Add option and enter Orange.
The color setting should be set to orange automatically. If it's not, then, click the color setting to the left of the name and choose the orange color block. - Click Add option and enter Red.
The color setting should be set to red automatically. If it's not, then, click the color setting to the left of the name and choose the red color block. - Click Add option and enter Blue. Then, click the color setting to the left of the name and choose the blue color block.
- Click Add option and enter Silver. Then, click the color setting to the left of the name and choose the silver (or grey) color block.
- Click Add option and enter Black. Then, click the color setting to the left of the name and set the color to black by clicking Set custom color, in the Hex field entering #000000, and clicking Select.
- Click Add option, enter Other. Then, click the color setting to the left of the name and choose the white color block.
Note: "Other" will be used to catch colors that aren't defined in the list of options. You could then update the Enum options later to include any colors that were set to Other.
The Color Enum settings appear as follows:
- Click Save.
- Click Add option and enter Orange.
Date
Do the following:
- In the Date column header, select More
> Edit column.
- Change the Name field to Year.
- Change the Type field to Number.
- Click Save.
Note: When prompted, click Yes to confirm the type change. The information doesn't apply in this case since there's no data in the table.
- Position your cursor in the Title column header and select More
- Add a new body style column, as follows:
- Click + Add column in the column header.
- Change the Name field to Body style.
- Set the Type field to Enum.
- Set the Item type field to Dropdown.
- Click in the first option field and enter Sedan.
- Click Add option, enter Coupe, and set the color to white.
- Repeat step f to add the following options: Hatchback, SUV, Pickup, Minivan, Other
Note: "Other" will be used to catch body styles that aren't in the list of options. - Click Save.
- Click + Add column in the column header.
- Add a new image column, as follows:
- Click + Add column in the column header.
- Change the Name field to Car photo.
- Set the Type field to Attachments > Image.
- Click Save.
The columns in the AppSheet database appear as shown:
Next, you'll create an app using the AppSheet database.
Step 2: Create an app using the AppSheet database
To create an app using the AppSheet database, do the following:
- In the top-right corner of the database editor, click Apps.
The Apps using Car inventory pane displays. No apps are listed. - Click New AppSheet app.
The AppSheet app is created and opened in the app editor in a new tab. - In the app editor, in the left navigation, click
to display the Data pane (if it isn't already displayed).
The Car inventory table is displayed. Notice that the source is the Car inventory table in the AppSheet database that you created in the previous step.
- To change the name of the app, click in the app name field in the top left corner of the app editor and change the name to Car inventory.
- To edit the Year column properties, click Edit
adjacent to the Year column.
- Turn off Show thousands separator -- since this value will depict the year the car was built which doesn't require a separator.
- Click Done.
Next, you'll turn on preview features in AppSheet to allow you to use AI in automations.
Step 3: Turn on preview features in AppSheet
To use AI in automations, you need to turn on preview features in AppSheet, as follows:
- In the app editor, go to Settings
, then select Views: General.
- Under General, turn on Preview new features.
- Click Save to save the app.
Next, you'll build an automation to extract information from a photo using AI.
Step 4: Build an automation to extract information from a photo using AI
To build an automation to extract information from a photo of a car using the Extract AI task , do the following:
- In the app editor, go to Automation
.
- Click + in the top header of the Bots pane.
- In the Add a new bot dialog, click Create a new bot.
A new empty bot is created and displayed in the center pane of the app editor. - Edit the name of the bot.
- Position your cursor over the New Bot in the left navigation pane.
- Select More
> Rename.
- Rename the bot to Update car inventory and press Enter.
- In the new bot flow in the center pane, click Configure event.
- For Event name, enter Update car inventory and click Create a new event.
The Settings pane opens in the right side of the app editor.
- Configure the event by defining a condition to ensure that a car photo is uploaded before triggering the automation. as follows:
- Click in the Condition field.
The Expression Assistant opens. - In the text box enter:
ISNOTBLANK([Car photo])
This expression ensures thatCar photo
column is not blank and contains a photo of the car. - Click Save.
- Leave all other settings set to the defaults.
The Settings pane appears as follows:
- Click in the Condition field.
- In the bot flow in the center pane, click + Add a step.
- For Step name, enter Extract from photo and click Create a new step.
The Extract from photo task is added and the configuration settings are displayed in the right pane.
Note: You might need to select the task in the center pane to view the configuration settings.
- Edit the task configuration settings in the right pane, as follows:
- Set the task type set to AI task.
- Leave the AI task field set to Extract. This AI task type extracts information from a photo of file.
- Leave the Input column field set to Car photo. This is the
Image
column used to upload a car photo. - Under Output:
- Turn on Save to table to save the extracted information to the AppSheet database.
- Notice that the first column is added and set to Make.
Leave this column selection as is. - Click Add and select Model in the drop-down, if it's not already selected.
- Click Add and select Color in the drop-down, if it's not already selected.
- Click Add and select Year in the drop-down, if it's not already selected.
Note: Don't select Body style.
The Output section appears as follows:
- In the Additional instructions field, enter:
If not sure of Make or Model, set to "Unknown"
If not sure of Color, set to "Other"
If not sure of Year, set to "0" The Settings pane appears as follows:
- Click Save to save the app.
Next, you'll test your automation using the app preview.
Step 4: Run the automation in the app preview
You can run the automation in the app preview located in the right pane.
To test the automation, do the following:
- Before you proceed, you'll need a photo of a car. Take a photo of your own car or download one from the web.
- At the top of the right pane, click
to display the mobile app preview.
- Turn off Edit in the app preview, if necessary. This will make it easier to interact with the app in the preview pane.
- Click + in the app preview.
- Scroll down and click in the Car photo field.
- Navigate to the car photo in you local drive and click Open.
- Click Save.
The car photo image is uploaded. AppSheet syncs the app, as indicated by the sync notification:
As AppSheet syncs the app, AI extracts information from the photo to populate the remaining fields. When the sync completes, the car is added to the inventory. - After the sync completes, click the new car item in the list to view the details.
Notice that the Make, Model, Color, and Year fields have been auto-populated .
Next, you'll add a step to categorize cars by body style using AI.
Step 5: Add a step to categorize cars by body style using AI
To add a step to the automation to categorize cars by type using the Categorize AI task, do the following:
- In the bot flow in the center pane, click + Add a step.
- For Step name, enter Categorize by body style and click Create a new step.
- Edit the task configuration settings in the right pane, as follows:
- Set the task type to AI task.
- In the AI task drop-down, select Categorize. This AI task type categorizes information.
- Under Input columns:
- Notice that the first column is added and set to Make.
Leave this column selection as is. - Click Add and select Model in the drop-down, if it's not already selected.
- Click Add and select Year in the drop-down, if it's not already selected.
Note: Don't select Color of Body style.
The Input columns section appears as follows:
- Notice that the first column is added and set to Make.
- Under Output:
- Turn on Save to table (if it isn't already selected) to save the extracted information to the AppSheet database.
- Click to open the drop-down and select Body style.
Recall that Body style is anEnum
column that defines the body styles that will be used to categorize the car.
- In the Additional instructions field, enter: If not sure of body style, set to "Other"
The Settings pane appears as follows:
- Click Save to save the app.
Step 6: Test the step in your automation
You can test a step in your automation--without updating any rows in your data source.
To test the step in your automation, do the following:
- Click
at the top of the right pane.
The Test step pane is displayed. If you are prompted to refresh the data, click Refresh.
The first (and only) row of app data is selected for the test input.
Note: If you had multiple rows of app data, you might click Select row to select a different row to test. - Click Run test to test the current row of data.
The Results section is updated to reflect the body style of the car.
Congratulations! You have built your first automation using AI.
What's next? You can access more quick starts to learn about other AppSheet features.