Donwload files recursively from a Google Drive directory

I want to download a bunch of PDF files from my drive and send it to chat GPT to analyze it´s content and extract it on a table. I want then to download it as a CSV.
I´m starting my scenario with a Search For Files/Folders from Google Drive attached to a download a file From Google Drive.
I don´t know how to iterate over all pdf in a Drive´s folder
Is it an automatic process? Because I see that the first module downloads a couple of bundles but from the same directory. Do I have to check all folders one by one? All files must be in the same folder?

Hi @Roger_Montero,

It is advisable to have the PDF that you want to analyze/interpret in a single folder which will allow you to process the file without worrying about wrong PDFs that might be present on your drive. However, It is not mandatory.

What you want to do is use Search Files/Folders Module in, and search for file with extension as .pdf, in here you can use the root folder to search all files or specific folder to search within.

After which, you can then use download a file module for the file that you get from Search Modules, you can bump the number of returns using Limit fields in the Search Module, for eg. just set limit to 100.

After which you can then run the ChatGPT module for further processing.


Thank you, @Runcorn for your answer.
My question was about the possibility of searching for files that are organized into folders inside a parent folder. I mean:
I have a folder for my bill and inside it, there is a folder for every supplier with the PDF files I want to download.
Should I make a scenario for every folder or is there a way to search "recursively on a folder and the subfolders?
I know now that I receive an array of bundles that I send to the “download a file” module.
Then I will send all downloaded files to Chat GPT.