I need to understand what is occurring when I create a spreadsheet. I thought I would see it on my Google Drive (and I do most of the time on creation) but when I delete (move to trash) the sheets that retool created, they still show up in the "list available spreadsheets" query
Hello @Stuart_Jackson,
Great question, my first though was that the query might be caching the results. However, I tested this out and a gSheet I just moved to the trash is still having its name appear in the Retool Query to get the names of sheets, even with query caching turned off.
I tried adding in data to the deleted sheet and the query succeeded, which was slightly concerning and then in Google Sheets I used command Z to 'un-delete' the sheet and when I opened it the data I added via Retool query was there.
It seems that Google Sheets holds on to a 'deleted' sheet for 30 days before it is fully removed from the account. I assume this is done to prevent users from accidentally deleting and completely removing data that is important and needs to be resorted.
And these ghost sheets in purgatory are accessible via API requests and can have operations performed on them. They just aren't visible from the top level list of sheets on the gSheets website from the UI.
This seems to be not Retool related, so I would recommend the Google Sheets official docs to learn more about their policies, API and how the Drive is managed
Yeah it is strange but as long as I understand whats going on I can code around it. Thanks for taking the time to research