web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Manual Trigger a flow ...
Power Automate
Unanswered

Manual Trigger a flow to get file content from sub sub sub folders.

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I'm trying to build a flow that helps to download individual file from many subfolders. 

My pain/situation currently is that the old system creates subfolders of individual results daily, and I need to manually extract the data from the final file from each subfolders

Below are the example of folders & name. Hopefully explainable.

 

20240201(date) > subFolder1 > subFolder1.1 > subFolder1.1.1(onwards from 1.1.1 to 1.1.60) > file.A

20240202(date) > subFolder1 > subFolder1.1 > subFolder1.1.1(onwards from 1.1.1 to 1.1.60) > file.A

 

So, the variable i have is everyday the main folder will have a new name, and sub folders 1.1.1 up till 1.1.60

the fixed is subFolder1, subFolder1.1, and the end file name file.A. so inside each subfolders 1.1.1 up till 1.1.60 will have file.A each which i will have to manually extract 60 files daily. 

 

I've done approval flow, triggering flow. But this problem i have above is quite hard to handle for my level of expertise.

For now, i can manually trigger to 1 file, but is there anyway to create a manual trigger flow path (changing the main folder name daily in the Flow variable) to 60 subfolders and download all 60 files. 

 

all helps, guides, and suggestion are welcomed!

 

Thank you.

Categories:
I have the same question (0)
  • royg Profile Picture
    on at

    Hi @OtisZZZ,

    You are missing a key element in your question which is the data storage architecture.

    Assuming you have a SharePoint Document library with the structure you described you can use the Get Files (properties only) action to only fetch a filtered subset of the files in that library and iterate the results to copy/download/performs other actions.

    There are 2 ways to filter the items, query all of them and filter using a Filter Array action or to pass a OData Query filter to the Get Files (properties only) action. I prefer the 2nd as it's more efficient but it depends on the actual size of your library.

    The process requires setting the Get items (properties only) action Pagination property to on (under settings) and set the Threshold to 5000.

    royg_0-1707296386049.png

    Next if you want to use a Filter Array action, add one and set its From: to value and the filter to Folder Path contains "subFolder1/subFolder1.1/subFolder1.1"

    royg_1-1707297016760.png

    If you opt to use the filtered query on the 1st step you can do something like:

    royg_2-1707297162650.png

    the expression should say: 

    decodeUriComponent('subFolder1/subFolder1.1/subFolder1.1')
    in order to treat whitespaces and special characters.
     
    Hope this helps 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard