Replacing data in google sheets

Hi Community!

I want to create the following process:

  1. The user will upload an excel file.
  2. The data will replace the existing data in the google sheets that is connected to my Retool app. I'm okay if the process will delete the contents in google sheets before uploading.

Appreciate any help.
Elad

Hi @Elad_Sharon,

A few questions:

  1. Have you tried uploading and extracting the data from an uploaded file using the upload component of Retool?
  2. Have you connected gsheet or sheets API to your retool resources?

What you're trying to do was something similar to the one I answered before but with an added initial process of converting an uploaded file to a data that can be passed on. If you can provide the details from the above question, we can guide you further.

2 Likes

Thanks for replying @jocen.
I'm new to Retool, can you share the steps to do what you asked?

Hello! To connect to the Google Sheets API @jocen mentioned you'll need to use a REST resource. You can read more about setting up auth with a Google resource in these docs or in Google's own docs. There's a list of scopes needed for the Sheets API listed here. Your resource setup page should end up looking something like this:

You can set up a separate resource using Retool's native Google Sheets integration as well, more info on connecting here, as well as a more general guide for using it here.

Once you have those two set up you should be good to follow the instructions from @jocen's post!

Let me know if you run into any trouble :slightly_smiling_face: