Syncing google sheet to mysql

How can we sync the data of google Sheets to the existing MySQL database in retool?

Hey @ishi8!

Which database would you like to be your main source of truth? At the moment it's possible to do bulk upserts on SQL resources (including MySQL) which should be helpful for pushing any data from Google Sheets to MySQL. You'd want to build a query that first pulls the data from Google Sheets, then another that upserts the data into MySQL, and possibly add a transformer in between to correct any formatting discrepancies.

The other way is a bit trickier, we don't yet have an upsert action with the Google Sheets integration though it is something we're looking into! I can let you know here when it's included. Otherwise, you might explore using a combination of the "Bulk update a spreadsheet by primary key" action to update existing rows, and the "Append data to a spreadsheet" action for adding any new data.

Let me know if that's helpful!

Hello Kabirdas,
I'm looking to solve the same problem. I understand your answer but my skills are obviously limited to develop an update with the google sheet an example would help a lot. or if you do have time for a meeting to explain how to work with retool to update mysql I would be happy?
thanks for your help.

Hey @seabusch!

Would you mind sharing a bit more about your use case? I'm a bit hesitant to recommend a general solution for syncing data as there can be a lot of considerations going into it (many of which I may not have the best answer for :sweat_smile: ). Checking out Workflows might be a great place to start as well!

Hi kabirdas;

If possible for you I would prefer to have a call or better a teams meeting. There I can show you where I want to go. I'm down to developer and it it would take too much time to learn how all that features work. But probably you can show me or I can hire you to do it for me?

Thanks for your response and all the best



I might not be the best person to do that but I'd try asking the Developer Network! There you can connect with someone who will give you more in-depth guidance around building to your specifications or hire somebody to build for you. Other community users who come across this post might be willing to do the same as well :slightly_smiling_face:

ok thanks