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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / when a document is upl...
Power Automate
Unanswered

when a document is uploaded, create a folder with the client's name and put the document in the folder.

(0) ShareShare
ReportReport
Posted on by 18

Hello everyone,

 

I would like to build a flow that helps with aggregating client documents. For context, we receive a lot of different types of documents for our clients. these documents come from different companies that both us and our clients deal with. 

 

Currently when we receive a document we tag it with the client's name who it is associated with, the type of document it is, and the Company it came from.

 

Here is what I would like to do with flow but currently stuck on how to do so.

 

for context, Let's say I received a file for my client, Chris, and the file came from the company, Microsoft. 

 

I would upload that file to my general document library, tag it with "Chris" "Microsoft" and doc type "Financial"

 

I would like the flow to Create a "Chris" folder under a parent folder labeled "Clients" --> if "Chris" folder is already there skip this step --> then create a "Microsoft" Folder under the "Chris" Folder ---> if the "Microsoft" folder is already there skip this step ---> then finally copy the file with all the tags to CLIENTS/Chris/Microsoft. 

 

so then if I received a document for Mike from Skype, ultimately the document would end up in CLIENTS/Mike/Skype whether or not the Mike or Skype folder existed.

 

how would I go about checking if these subfolders exist, creating them if they do not, and then finally copying the file over to that subfolder?

 

Thank you so much for reading!

 

 

Categories:
  • efialttes Profile Picture
    14,756 on at

    Hi!

    "Currently when we receive a document we tag it with the client's name who it is associated with, the type of document it is, and the Company it came from."

     

    Sharepoint? If so, can you share more details on the way you tag it? Do you store it in a library, created metadata columns to add type of document, company, client name? THe more information context, the faster will be to get useful insights

     

    Thanx!

     

  • mdemarici Profile Picture
    18 on at

    Thank you for your response, @efialttes 

    When we receive the file we upload it to a SharePoint site where our document library is. Our document library has multiple levels of folders - Company --->  Type (Financial, legal, reports, etc.) ---> year. Once it is uploaded in the correct folder, we currently tag document type, client, and department of the company it came from. For this flow, I've built managed metadata term stores for the client names which populates the column in which i hope to trigger this flow. The most important columns for this flow so far would be Client (managed metadata), Document type(Choice), and Company name(default, or choice).

     

    The goal would be to aggregate all of the Client documents into their individual folders once a file is uploaded to the document library and tagged. I don't plan on the Client folders to have as many levels of folders that we implement in our main document library.

     

    The goal would be for the flow to trigger when a document is added to our document library and is tagged. Ideally it would copy the file to a Folder with the Clients name (if not there create it) ---> then to a folder with the company's name it came from (if not there create it). Within this last folder the document would maintain all tags and be sorted by them instead of the folder structure in our main document library. (type --> year, etc.)

     

    The part where I am specifically stuck is where the flow makes folders based on the clients name/company of origin or copies the file to the correct folder if it is already there. 

     

    Thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard