Skip to main content

I’m trying to get a list of files in a certain folder in a specific shared drive via the Google Drive API Request integration.  The Shared Drive ID is static, it won’t change.  The ID of the folder I need the list for is retrieved from a previous step.

I’m using the URL: https://www.googleapis.com/drive/v3/files

And the following parameters:

  • driveid = rid of shared drive]
  • corpora = drive
  • includeItemsFromAllDrives = true
  • supportsAllDrives = true
  • q:parents = >ID from previous step]

After a bunch of trial and error, the step finally executes with a 200 and the list of files.  The problem is that the files aren’t restricted to just the parent folder I want.  The result set has over 50 files, but there are only 3 in the folder I’m testing with.

 

Any words of wisdom?

 

Hi @ACA 

For us to have more info, post screenshots showing how your Zap step is configured so we can see the field mappings.


Sorry, I thought I put all that info in the post.

 

 


@ACA 

What is the link to the GDrive API endpoint documentation you referenced to configure the API request?

(Not this URL: https://www.googleapis.com/drive/v3/files)


https://developers.google.com/drive/api/reference/rest/v3/files/list


@ACA 

Your q parameter may be wrong

Try this…

Left field: q

Right field: ‘XXX’ in parents

Replace XXX with the ID of the Folder

Help: https://developers.google.com/drive/api/guides/search-files

 


I read that all wrong.  I didn’t think you could format an api call like that.  Excellent catch!

 

Your assistance is much appreciated.


Now, I have to figure out how to select the file I need to act on for the next steps...


Hi @ACA,

I just came across your post here and wanted to check in here to see how you’re getting on. Were you able to figure out how to select the file that you need?

Please do let us know if you’re still in need of some help on this at all - happy to assist further! 🤗


Thanks for the follow up, @ken.a.  Yes, I was able to get it going with @Troy Tessalone’s pointer.  Screenshot of the working panel below for completeness of the post.  Now that I know how to do this, I’ll be using the API features of the Google tools more often.

 

 


That’s awesome @ACA! Thank you for looping back with an update here.

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗