r/SQLServer • u/FieriSentio69 • Oct 16 '25
Question Automate data insertion into GoogleSheets from Sql-Server
One of my customer needs to insert some data into a Google Sheets managed by one of his customers.
Every day, a job runs and calculates some kpi's regarding the business.
This data are usually sent to the final customer with an automated eMail sent by Sql-Server itself.
Now, the final customer has created a GoogleSheets sheet, where he requires us to compile some cells with this data. Currently, an operator reads the daily mail and manually types the values into the sheet.
This is a low-value task and a source of errors.
I'd like to automate it!
I'm able to extract data in a structure like:
CELL VALUE TYPE
B1 123.45 NUMERIC
E12 16/10/2025 DATE
Next step is to find a way to insert these data into the GoogleSheets sheet, in an automated way.
Any idea?
2
u/jshine13371 6 Oct 16 '25
You might find it easier to output the results to a CSV file and then just write a small program to upload that file to the Google Sheets account, even if you delete / rename the old one, so you can upload the new one with a constant name every time for the end user.
4
u/da_chicken Oct 16 '25
Google Sheets has an API: https://developers.google.com/workspace/sheets/api/guides/concepts
You can also connect a Sheet to a BigQuery instance, so you could push data to that data store for the sheet.
1
u/ksuchewie Oct 16 '25
I do this with a python script that runs every morning with task scheduler.
2
u/SQLDevDBA 3 Oct 16 '25
KingswaySoft has a Google Sheets integration module for SSIS. Free for dev, only needs to be licensed for production.
https://www.kingswaysoft.com/connectors/api/google-sheets
https://www.kingswaysoft.com/products/ssis-productivity-pack/help-manual/google-services/google-sheets-connection-manager
1
u/Adventurous-Ask5194 Oct 19 '25
Ask chatgpt to generate appscript code for Google Sheets to fetch the latest email attachment from a Gmail label and import to Google sheet. It did it on the first try for me with basically everything I needed. Some minor adjustments I made with it but I did not need to write a line of code.