Across our operations, the business and field teams live in Google Sheets. It's fast, familiar, and it's where they add a new lead, update a loan record, or correct a figure the moment it changes - no tickets, no waiting on IT, no learning a new tool. That's exactly how it should stay: asking the business team to update a database table directly isn't realistic, and it was never the plan.
The problem was what happened after the sheet got updated. Our BI reports don't read from the sheet at all - they read from our data warehouse, a GCP-managed PostgreSQL instance. So every change the business team made in the sheet was invisible to the reports until someone manually exported the data and reloaded it into the warehouse. New rows, corrected amounts, updated statuses - all of it sat in the sheet, disconnected from the dashboards leadership was actually looking at.
We needed a bridge: a way to let the business team keep working in the sheet exactly as they do today, while making sure the warehouse - and everything built on top of it - always reflects what's actually in that sheet.
Architectural Diagram
The Solution
Here's how we closed that gap, infour steps.
Step 1 - Enabled the API
The first step was giving our automation a secure, no-password way to read the sheet. We enabled the Google Sheets API (and Google Drive API) on our GCP project, and created a dedicated service account for the job. The sheet was then shared with that service account as a Viewer - the same way you'd share it with a colleague - so our automation could read it without ever touching anyone's personal Google login.
Step 2 - Script Development
Next, we built a Python script thatdoes the real work: it connects to the sheet using the service account, readsevery row exactly as it appears, and cleans it up - converting dates, handlingblank cells, and catching the odd stray value - before mapping it to the targettable's columns in our PostgreSQL warehouse.
Step 3 - Tested It: Truncated andReloaded
Before trusting this with production data, we tested the full cycle end to end: read the sheet, truncate the target table, and reload it fresh - all inside a single database transaction. That last detail matters: if anything fails partway through, the whole operation rolls back and the table is left exactly as it was, so a bad run can never leave the warehouse half-loaded. We validated this against real records and confirmed the row counts and key figures matched the sheet exactly.
Step 4 - Scheduled on the VM
With the script proven, we moved it onto a production VM and scheduled it to run automatically once a month, using a secure IAP tunnel to reach the database - no open ports, no exposed credentials. From here on, the sync happens on its own: the business team keeps updating the sheet whenever they need to, and the warehouse - and every report built on it - picks up those changes automatically, every month, without anyone touching a script or a spreadsheet export.
The Result
The business team's workflow didn't change at all - they still just work in the sheet. What changed is everything downstream: the data warehouse and BI reports now stay in sync with that sheet automatically, securely, and without manual intervention.



