Question

How to use q for Google Drive Folder

  • 14 June 2023
  • 4 replies
  • 375 views

Hi,

 

I am new here and don’t get how to use the q, to search for a specific folder in my google drive.

Can someone please help me

 

 

 

This is what I have, but its wrong :(

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +11

Great question here, @Aylee

Looking at the query string examples Google gives if you’re looking to search for a file/folder with a specific name you’d need to use the query name='nameofthefileorfolder'. And to ensure it only finds folders, not files with the same name you’d want to add and mimeType = 'application/vnd.google-apps.folder'. It looks like it works without the files.list part so you can remove that.

So the Query String Parameters would look like this:
678be403170dbb0cb7863c0df107ebd5.png

That should get the API Request (Beta) action to make a GET request to Google Drive and search for any folders with the name “Aylee”. 

There is an existing action event for Google Drive called Find a Folder which would also allow you search for a folder by name: 
e2183c2fce9b6021c7dae7e836f0c46c.png
Not sure if you’ve tried using that already but thought I’d mention it in case you’d missed it and wanted to give it a try instead.

Hope the above information is helpful. If you run into any issues in making those changes just let us know, always happy to help further! 🙂

Great question here, @Aylee

Looking at the query string examples Google gives if you’re looking to search for a file/folder with a specific name you’d need to use the query name=’nameofthefileorfolder’. And to ensure it only finds folders, not files with the same name you’d want to add and mimeType = 'application/vnd.google-apps.folder'. It looks like it works without the files.list part so you can remove that.

So the Query String Parameters would look like this:
678be403170dbb0cb7863c0df107ebd5.png

That should get the API Request (Beta) action to make a GET request to Google Drive and search for any folders with the name “Aylee”. 

There is an existing action event for Google Drive called Find a Folder which would also allow you search for a folder by name: 
e2183c2fce9b6021c7dae7e836f0c46c.png
Not sure if you’ve tried using that already but thought I’d mention it in case you’d missed it and wanted to give it a try instead.

Hope the above information is helpful. If you run into any issues in making those changes just let us know, always happy to help further! 🙂

Hey, thanks for your help, but if I use this command I get the following error in test:

 

Userlevel 7
Badge +11

Thanks for giving that a try, @Aylee. Sorry to hear it didn’t work as hoped.​​

Hmm, it looks like the quotes are different:
fa70db057c0dff16bb8307a743520535.png
I’m wondering if that might be what’s causing that “invalid value” error message. It looks like when I copied and pasted my example in here from my Zap the quote marks changed for some reason. Apologies if that’s indeed what has caused the error here! Just in case, I’ve changed the quotes my previous message in case someone else finds this topic to prevent them running into the same issue.

Can you try changing the quote marks used around the 'Aylee' part to match those that are around the 'application/vnd.google-apps.folder' and let us know whether that fixes it?

Thanks for giving that a try, @Aylee. Sorry to hear it didn’t work as hoped.​​

Hmm, it looks like the quotes are different:
fa70db057c0dff16bb8307a743520535.png
I’m wondering if that might be what’s causing that “invalid value” error message. It looks like when I copied and pasted my example in here from my Zap the quote marks changed for some reason. Apologies if that’s indeed what has caused the error here! Just in case, I’ve changed the quotes my previous message in case someone else finds this topic to prevent them running into the same issue.

Can you try changing the quote marks used around the 'Aylee' part to match those that are around the 'application/vnd.google-apps.folder' and let us know whether that fixes it?

I think it worked now! This is the test result, status 200:

 

But I am still not able to use the files in the google drive.

After Step 2 (Send http request to google drive)

This are my next steps and at Step 5 there is an issue.

Basically what I want is to get a Picture from Google Drive, use OpenAI and make a tweet on Twitter.