Need help connecting Retool to Sheets in Shared Drive

I need to connect a spreadsheet in Google Sheets that is located inside a Shared Drive. I've already shared it with the service user that i normally use, but had no luck so far. My company has blocked external sharing of Google Drive documents, but i've already disabled this config in this particular Shared Drive so it should be working.

The strange thing that happens is that if the spreadsheet is moved to a personal drive (with external sharing turned on) it connects.

Any idea what might be happening and what to do to fix it?

Hi @Henrique_Silva,

Can you share the screenshot of any error message you see?

The fact that it works when you move the file to your personal storage means that the authentication (service account) works. It is likely some permissions issue with accessing files from shared drive.

Thanks for the fast response Harry, unfortunately there's no screenshot of errors to be taken.

(image has been edited so no confidential information is shown)

The problem is that it just doesn't show up in the list of spreadsheets when we try to connect it to the original spreadsheet in the Shared Drive, but when we copy it to a personal drive, it works.

Forgot to tag @Harry_Doan

@Henrique_Silva Sorry, I forgot to ask do you use an onprem version or retool on cloud? Accessing spreadsheets from shared drive is added recently so I don't know if you miss that because you're on prem :thinking:

I've verified that it works to fetch files from shared drive on our latest cloud version.

Pretty sure i'm on cloud, how recently was it added? We've just updated our plan and alongside the version of retool too.

Does the google sheets resource need to be created again in the new version? It was created on an old version, maybe that's it?

@Henrique_Silva What version you see when you click on the (?) circle in the bottom left of the screen? And what is your org name? Do you use OAuth authentication or Service Account authentication for the resource?

If it's something fairly recent (3.xx), I can only guess that your permissions set up is not correct yet. You shouldn't need to recreate the resource. We should try to fetch files from all drives and all items that are permissible.

You can also try by using the spreadsheet ID directly in other functions, like this:

  1. Copy the ID from google drive URL:

  2. Use "fx" to paste it in the Retool query UI

Hey, found out what it was! Thanks for the help! We just recently updated Retool, but the resource that was used to connect to Google Sheets was created in an old version.

I guess that internally the resources are not really updated alongside Retool to prevent from apps breaking every update right?

What i did was create a new resource with the same google service account and it worked!

1 Like

@Henrique_Silva Awesome. I'm glad it works for you now. Yeah, sometimes we introduce changes that are incompatible and we would not apply it to existing resource to prevent regressions. This maybe was one of them.