Skip to main content

I have been trying to automate uploading/deleting from a Google Drive Shared file using a GoogleDriveConnector, which I thought was recently changed to support shared drives.

 

The first issue is that the files do no automatically overwrite if they have the same name, they create duplicates, whereas if you upload manually the files will become versioned.

 

To get around this, I assumed I would be able to identify and delete the older file first before uploading the new file, however when trying to delete the older file I get:

"2021-10-20 15:19:39| 21.6| 0.0|INFORM|Delete_existing_file: Object with id "File ID" does not exist on Google Drive. Nothing to delete".

(I have removed the ID for this post).

 

I have permissions to delete from the drive, and I have created the shareable link manually as a check to confirm that the file ID is correct and exists. I can successfully upload new files to the said folder, but I'm trying to avoid a scenario where I have a load of outdated files taking up space.

 

Any ideas?

Just to add to this briefly, if I switch the GoogleDriveConnector with an HTTPCaller and perform the DELETE that way, I can successfully remove the files/folders as required. In the caller I specify the parameter "supportsAllDrives" to "true" which is "false" by default (https://developers.google.com/drive/api/v3/reference/files/delete) - that may have something to do with the transformer not performing as it should for the DELETE method?


Hi @James Singleton​ ,

I've done some testing with both of these issues you've raised.

I've filed an enhancement for the development team to look at handling the naming convention of duplicate file names to see if it's possible with the API to version the duplicate named file.

 

With regards to deleting from a shared drive, I was able to reproduce this issue despite having permissions. I've filed a problem report to address this.

 

Thanks for raising this with us, I've linked this question to the problem reports filed and will update this community case when it's been resolved.

-Andrea


Hi @spatialexjames, I was trying to do the same (deleting from a Google Shared Folder) using the GoogleDriveConnector but I get an API error indicating the API key is not valid.
Now I’m trying to do what you did with the HTTPCaller and it works for in my google drive folder files but when I change it to the files in the google drive shared folder files it keeps telling that it cannot find the files.

In the HTTPCaller I’m passing the file object id like so:

https://www.googleapis.com/drive/v3/files/@Value(_id)

which works for my google drive folders but not for the google shared folders.

Would you mind sharing how did you set up your caller?.

Thanks in advance.

RZ.-


Hello,

Never mind, I was able to find the reason why the Delete in GoogleDriveConnector does not work and a solution for it.

Here is the link to the solution:

Regards,

RZ.-


Reply