• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Trigger for a new file in a Google Drive folder and ANY subfolders (WITHOUT predefining them)

apps

Member
How can I make Pabbly Connect check for new files in a specific folder including all of its subfolders without having to define all subfolders in advance?
So basically I have a folder for all my accounting documents and I continuously add new folders to it for months and in addition vendor folder. And so while I checked the thread below it does not work for my Instance:


I have Main Folder > YYYY - Month - Vendor
And I want Pabbly to trigger for every file I might add for any file in any of those subfolders whatever their name is. This is why it is not a solution to predefine the folder. It should simply work for all subfolders no matter their name/id

Trying to figure it out here with no luck: https://connect.pabbly.com/workflow/mapping/IjU3NjYwNTZhMDYzNDA0MzM1MjZhNTUzMjUxMzMi_pc
 

Soumya Tripathi

Member
Staff member
Hello @apps
Please add the action step of Google Drive in you workflow so that we can look into it.
Also, please be aware that to assist you effectively, we may need to access your Pabbly Connect account. If you're comfortable with this, please grant us permission by stating in your next email: "You have my permission to log into my Pabbly Connect account, and edit workflow {If required}. Here is the registered email address associated with it."
 

ArshilAhmad

Moderator
Staff member
You would have to set up your workflow in this manner.

  1. Set up 'Google Drive: New File' as your trigger step. It triggers whenever a new file is uploaded to your Google Drive, regardless of the folder.
1753292723601.png


  1. Then, add a 'Google Drive: Get File or Folder by ID' action step to your workflow and search using the Parent ID of the file. The Parent ID refers to the 'Sub-Folder'. This step will fetch the Parent ID of the sub-folder, i.e., the original folder to which the sub-folders are being added.
1753292889833.png


  1. Add a Filter as step 3 of the workflow to ensure that the subsequent steps are executed only if the files are added to the sub-folders of the original folder.
1753293102991.png


1753293341933.png
 

apps

Member
Hi ArshilAhmad,

Thanks for the answer. I can't quite comprehend how this would work. My setup is this:
Main Folder > YYYY > Month > Vendor
So I only want to trigger the flow for files that go into "Main Folder" OR any of it's subfolders whatever they are.

Following your flow it seems to work like this:
Imagine I upload a file in
Gdrive > Main Folder > 2025 > August > Pabbly > Invoice.pdf (5 directories)
Gdrive > Main Folder > 2026 > July > Apple_Invoice_12312.pdf (4 directories)

And then I also upload files in
Gdrive > Random.pdf
Gdrive > Random folder > Test.pdf
With your flow it seems it would run on all files as far as I see. I don't see how the filter helps because it just select the subfolder whatever it is.

I do not want the random.pdf file or the Test.pdf - because they are not inside the "Main Folder".
Can you clarify please - because I don't understand exactly what ID's I put - as how I read your instructions I can't follow how it works.
 

ArshilAhmad

Moderator
Staff member
Ignore the previous workflow we shared.

Please check out this workflow:
  1. The trigger remains the same—it will still trigger on every file uploaded to your Google Drive.
  2. In step 2, we are using the 'Global Search' action with a query to ensure that only files uploaded within the Main Folder are fetched.

1753307230137.png


  1. The Filter will ensure that only files uploaded to the Main Folder (regardless of how deep within its subfolders the file is placed) will trigger the next steps. If the file is not uploaded to the Main Folder—or any of its subfolders, sub-subfolders, and so on—then the next steps will not be executed.
1753307399685.png
 

apps

Member
Hi again, thanks for the response!

I tried to set this up.

I took the folder ID:
1753363626523.png


And inserted it here:
1753363658588.png


But I get an empty response
1753363707284.png


But the file is there?
1753363765131.png

So something still seems wrong? I copied the exact ID of the main GetInvoice folder url as you see on the screenshots.

The specific namecheap invoice file is in Gdrive > GetInvoice > 2025 > July
 

ArshilAhmad

Moderator
Staff member
It looks like the 'Global Search' doesn't fetch a file located within a sub-folder of the Main Folder. The file shown in the example I shared above was retrieved from the Main Folder itself. We apologize for the inconvenience caused.

We have set up this workflow for you, which uses routers and filter conditions to continuously search for the parent of the file. Once the Parent ID matches the ID of the Main Folder, the filter condition is met, and the next steps are executed.


Please take care when configuring the router conditions and mapping the data to avoid any issues
 

apps

Member
Wow, thanks! Checked out the workflow. Can't quite understand it - it looks very complicated :-D But I will try to reproduce it.
Could be great if Pabbly had an option to simply trigger for all files in a certain subfolder? Doesn't Google af an endpoint or parameter for that?
 

apps

Member
Hi again,
I tried to set this up but got stuck. I don't see how this work as I have multiple years and 12 months in each year. So the flow doesn't seem to work unless I am missing something. It seems that the workflow assumes I have a subfolder "Year" with a subfolder of Month. I am trying to show what I mean here:
 
Top