Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How to get folder and sub-folders values during upload for Document library column

hello All,

i am trying to get the folders value during upload using flow. i was able to get the sub-folder value but not the root folder value though. so i will have two levels of folders, root folder as agent name and sub-folder as project name. under one agent could have multiple projects to manage. usually users will upload files from inside project name folder. Lets say if have agent name 'Wavecrest' and project name 'South part' so when user upload any files from South park project folder i would like to get Wavecrest and south park value should be automatically inserted into the column. same should be applied for all others project name folders.


Super User III
Super User III

Hi @mmahmud 


Not sure what you meant by automatically inserted into the column? If you looking to get the folder names here are the steps.




Expressions I used above is as follows:


Here are my test results:

Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up

Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Regular Visitor


Thanks for your reply. i will look at your steps and let you know. all i am trying to get the folder and sub-folder value when they upload from sub-folder. Lets say if i have root folder "Agent A" and sub-folder name "South park", so when user will upload file it will get both folder values and automatically display in the right pane that means into columns ( i have those site columns for Agent Name and Project Name). i hope its not confusing no more:)

Thanks again. 

Regular Visitor


i was able to replicate your flow but my column is not updating with the values from folder (Agent name) and sub-folder name (Project Name). all i am trying to get the folder values and automatically will update both columns.


Thanks for your help.

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,150)