How I built an AI powered Inspection App for the Avengers
April 23, 2024
AppSheet
Google AppsScript
Google Cloud
AI
How I Built an AI-Powered Inspection App for the Avengers
Even superheroes can’t save the universe without efficient business processes!
In this Video, I walk through how Google’s hidden superpower, AppSheet, helped the Avengers make reporting on Hero Work a breeze.
This video features a clean & easy Inspection App with a Gemini/Vertex integration. Here’s some of the highlights of the build. If any of these seem valuable to your use cases, peek under the hood and retrofit.
Data lives in AppSheet Database; Allows two User types to file multiple Inspections on multiple Sites (with mapping support)
Virtual Columns on the Sites table Averages the severity score from related Inspections and powers a format rule
Inspections collect an Image and a Severity score.
Bot takes that Severity score and converts it to a Text-Based Generative AI prompt.
A VERY SIMPLE AppsScript function manages the communication between AppSheet and the VertexAI endpoint.
AppsScript file has all the Variables you need to update for your own use marked in a dedicated file. EASY.
VertexAI returns a dramatized “Mission Report” Summary in Markdown format so it can look clean in the AppSheet Markdown supported LongText field.
I have a Loading GIF that shows/hides while waiting for the script to finish.
Obviously, this use-case is fictitious and I have no personal or professional relationship with the Avengers…
How to copy and run in your environment
In order to get this VertexAI integration running, you’ll need to follow these steps (The UI / location of some of these things may have changed since writing):
On the top right of the information page, there will be a COPY icon. Press that.
Rename to something local to your environment (You’ll have to search for it in the next step)
Change the variable PROJECT_ID in constants.gs file to the project ID your created in the GCP setup.
Run the quickTest() function from the AppsScript Runtime tools (explained in the comments on Code.gs file. This will prompt you to authenticate. Once authenticated, the script will store your access token for a while. This is required for running this code from AppSheet.
Update the prompt or the temperature of the AI if you want to explore other outputs 😀
Navigate to the link above. Should open the AppSheet Editor for this app
Click the Copy Icon in the top left of the Editor UI.
Rename the App to your liking. Copy files & data.
You can save to whatever data source makes sense for you.
Retarget the Automation to your version of the AppsScript
Open Automation Menu
Click on the first Bot listed
Click on the Get Summary from VertexAI action step
In the settings of that Step, Click on the Script Project file selector
Retarget to the script file you just created.
Click the blue Authorize Button
Test the app out by adding a new inspection form to any of the Sites
If you enjoyed this demo, had any issues during setup, or actually helped save the world with your adaptation of it, let me know in a comment below!
For more free content, Check out our YouTube Channel. For a big library of Training content prepared by product experts, check out AppSheetTraining.com.
Do you want a helping hand in unlocking the full power of this technology for your organization? Reach out to us at www.QREWTech.com
Stefan Quartemont
Stefan Quartemont is a No Code & Low Code app development expert. Co-founder of QREW Technologies, AppSheetTraining.com, and NoCodeList.co, his leadership and problem-solving skills drive the enhancement of business operation technology, aiming to positively impact employees and customers through efficient and effective solutions.
Bring your Business into the Future
Throw the paper forms in the trash 🗑️ ... delete the spreadsheets! 🚫 It's time to gain massive technical leverage over your operation💪