Question

Google Drive filtering on folder path


Hello support, 

 

Scenario: There’s a google drive with multiple folders and subfolders containing files. It’s a mess. I want to create a Zap to sync files from the drive and store them somewhere else - S3 for example. Before syncing I want to filter files only from folders which contain keywords “safe”, “complete”, “useful” etc.

Problem: Currently there’s no way to identify full google drive file path

Problem #2: Currently there’s no way to trigger an event on “File update” regardless which folder/subfolder it’s in. 

Request: I know there’s a feature request for this. I’d like to bump it up as right now it’s key missing feature for us. 

If it’s any help, here’s an example how other tools do it: https://github.com/danswer-ai/danswer/blob/main/backend/danswer/connectors/google_drive/connector.py

 

I’m aware of folder_id in the URL - it doesn’t work as it’s referring only to current folder and it’s not keyword filter friendly.

If you have any reasonable workarounds, let me know please. 

 

Thanks for your help

 


3 replies

Userlevel 7
Badge +11

Hi @Jerry B, welcome to the Community! 🎉 

Thanks for sharing that helpful example here, I’ve passed it over to the developers in case it helpful in getting this sorted! 🤞
 

Problem: Currently there’s no way to identify full google drive file path.

You mentioned that you’re aware of the folder_id in the URL, is it that you’d also like to get the parent folder? If so, perhaps you could try constructing the file path by using the value in the Parents ID field that’s supplied from the trigger? 
 

Problem #2: Currently there’s no way to trigger an event on “File update” regardless which folder/subfolder it’s in. 

It appears the main thread related to that feature request had been closed automatically:


I’ve re-opened it so we can continue to keep discussion of the feature request going there. And I’ve added your vote to help bump up it’s priority and allow us to notify you as soon as it’s resolved. If we come across any workarounds, we’ll be sure to share them in the main thread. 🙂

Hope that helps to get you pointed in the right direction. If I’ve misunderstood or you run into any further trouble with the file paths do let us know!

Hey Sam,

 

Thanks for adding my vote. 

Folder id from URL gives info only about first parent. If there’s a folder1/folder2/file, there’s no way of knowing about folder1. 

For now I’ll keep looking for solution

Userlevel 7
Badge +11

Ah I see, @Jerry B!

In that case, I’d recommend reaching out to our Support team to request that they open up a feature request to have all the subfolder IDs returned as well. You can do that here: https://zapier.com/app/get-help 

Sorry to not have a more immediate solution, if I come across any potential workarounds for getting all the folder IDs I’ll be sure to let you know. And if you’re able to find a workaround in the meantime, please do let us know - would love to hear of your progress on this! 

Reply