Skip to main content

We are trying to use GoogleDriveConnector to update a folder within a shared folder on Google Drive. Unfortunately, when uploading the folder to the shared folder, it creates another folder with the same name as the one we’re need to update. We’d preferably like to overwrite this folder, or delete the Google folder before uploading, or something.

There is a delete in GoogleDriveConnector but you have to have the exact Google id for that folder, which will change each time the FME is run. So we can’t automate weekly since we won’t know what the id will be each time.

If neither of those options are possible (overwrite or delete), is it possible to upload to Google with a new name for the folder (like with a timestamp) so that we all know which is the most updated? (We can manually clean it out after that if need be.) This is less preferable, but right now I’m looking for any solution that may help our needs.

Thanks!

How I would do this:

  • Do a List action to get all foldernames using a GoogleDriveConnector.
  • Check which folder name is the same as the new folder name, using a FeatureMerger, listed folders are suppliers. This will return the ID.
  • Delete the existing folder using a second GoogleDriveConnector based on the retrieved ID.
  • Upload the new folder using a third GoogleDriveConnector.

Thanks! That’s about the solution I came up with too. It took a while to figure out that I needed three GoogleDriveConnector’s strung together.

It’s still not ideal because of deleting and replacing, which changes the Google id (which would make things more difficult for anyone wanting script out their own download). So permissions would need to be based on the parent folder and not the folder being shared.

Some sort of "update" or “overwrite” in GoogleDriveConnector would bring the number of transformers down to 1, as well as keeping the same Google id/link.

Thanks again!


Reply