I built PolicyPal for the Google Cloud Run Hackathon, an AI-powered assistant that helps users understand their health insurance coverage using Google Cloud Run, Gemini (AI Studio), Cloud Functions, and Google Sheets.
In this post, I’ll briefly explain how I built it, what I learned, and how Cloud Run helped me deploy a fully serverless, scalable solution.
What’s Under the Hood
- AI Layer: Google Gemini (via AI Studio) I used Google AI Studio to vibe-code and design the conversational logic, defining custom schemas, checkCoverage and listCoveredProcedures, that guide Gemini to access real structured data. These schemas help Gemini know where to fetch data and how to format its responses. Essentially, Gemini calls my backend throu...
I built PolicyPal for the Google Cloud Run Hackathon, an AI-powered assistant that helps users understand their health insurance coverage using Google Cloud Run, Gemini (AI Studio), Cloud Functions, and Google Sheets.
In this post, I’ll briefly explain how I built it, what I learned, and how Cloud Run helped me deploy a fully serverless, scalable solution.
What’s Under the Hood
- AI Layer: Google Gemini (via AI Studio) I used Google AI Studio to vibe-code and design the conversational logic, defining custom schemas, checkCoverage and listCoveredProcedures, that guide Gemini to access real structured data. These schemas help Gemini know where to fetch data and how to format its responses. Essentially, Gemini calls my backend through these definitions to get real plan data.
- Backend: Python on Google Cloud Functions A Python serverless API that queries Google Sheets and returns structured JSON responses. This backend handles requests from Gemini, fetches health plan data from Google Sheets, and sends structured responses back to Gemini for natural-language output. After deploying, Cloud Functions provided a unique URL, which I connected to the schemas in AI Studio, this is how Gemini calls the backend in real time.
- Data Layer: Google Sheets I created a view on one of the databases I worked with locally that captures structured health plan data (in a de-identified form) and exported it to CSV, which I then imported into Google Sheets. Each plan has structured fields like healthplan_name, service_name, monetary_limit_per_year, monetary_limit_per_month, coverage_days_in_a_year, and is_covered. The backend reads this data securely through a Google Cloud service account that has read access to the sheet.
- Frontend: Built in Google AI Studio (React + TypeScript) By vibe-coding, I built the frontend directly inside Google AI Studio, using Gemini as the chat engine and connecting it to my backend endpoint. The frontend is safely deployed on Google Cloud Run and provides a simple chat interface where users can interact with the PolicyPal assistant.
How I Built It
- Built the frontend interface and created AI logic in Google AI Studio, defining the schemas checkCoverage and listCoveredProcedures.
checkCoverage
{
"name": "checkCoverage",
"description": "Checks if a specific procedure is covered under a health plan",
"parameters": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "The name of the health insurance plan"
},
"item": {
"type": "string",
"description": "The procedure or treatment to check"
}
},
"required": ["plan", "item"]
}
}
listCoveredProcedures
{
"name": "listCoveredProcedures",
"description": "Lists all procedures covered under a health plan",
"parameters": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "The name of the health insurance plan"
}
},
"required": ["plan"]
}
}
- Wrote the backend in Python to connect to Google Sheets and deployed it to Google Cloud Functions.
- Linked AI Studio to the backend via the Cloud Function URL.
- Tested the full flow between Gemini, the schemas, and the backend. End-to-end flow: User → Gemini (AI Studio) → Schema Call → Cloud Function → Google Sheets → AI Response
What I learned
• Integrating Google Sheets as a lightweight live database using service accounts.
• How to structure health plan data for reliable AI retrieval.
• The importance of structured responses in AI workflow.
• Handling AI-to-API communication patterns (defining input/output schemas for structured reasoning).
• Becoming more familiar with Google Cloud Console, learning how to enable APIs like the google sheets API, Identity and Access Management (IAM) API, and the Cloud Functions API. Looking forward to working more with Google Cloud.
This project reinforced a key design insight:
AI Intelligence = Reasoning Power of LLMs + Access to Structured Knowledge.
This blog was created as part of my submission for the Google Cloud Run Hackathon 2025.
You can also see the app in action via this youtube link: https://youtu.be/GwMWuzunBdM