r/PowerAutomate • u/yurrgang23 • 7d ago
One Flow with Multiple Subfolders
I’m trying to see if it’s possible to do one Power Automate flow that allows me to drop documents in multiple subfolders (around 70) and when the files are dropped they will send an email to specific individual emails. So one subfolder would go to one email address. Would any of you know if that’s possible? And if so, how? (I’m very new to Power Automate)
2
u/OlijkeWombat 7d ago
Are you dropping the 1 document in 70 subfolders (if so. Why?)? Or are there 70 different documents?
In the first case you will need some kind of list of the specified subfolders and related mailadresses, like in a table in excel or a sharepoint list. Then you call this list in powerautomate and loop your flow in an apply_to_each step on each row of this list.
2
u/yurrgang23 7d ago
It’s not 1 document in 70 subfolders. I apologize if my wording was off. As a hypothetical. Let’s say I have 500 total Microsoft text documents. Those documents are then grouped by an office with a specific office symbol (each office symbol is a subfolder). I want to drop those documents off in the subfolder, and have those emailed to an organizational account through outlook but only for that office. So on and so forth. I hope that helps
2
u/OlijkeWombat 7d ago
Then my response remains the same but you add the office symbol in another column in your list and filter the documents by the symbol for each row.
2
1
1
u/mnguy4575 7d ago
Let me add its SharePoint document library though.
1
u/yurrgang23 7d ago
Our current process is to drop the documents off in a sharepoint. Then I grant access to members so they can pull the files from that folder.
How did you set this up the way you have it? I’m trying to avoid people having access to things they shouldn’t have so I’m looking to move the process to dropping the item in a folder, sending an email, then the members retrieve it.
As a disclaimer, the sharepoint we use is monitored and administered by another agency so I can only do so much without admin rights
1
u/HoldPowerful7487 6d ago
The thing that'll stop you first is the trigger. When a file is created in a folder only watches one folder, so that route is 70 flows.
Use When a file is created, properties only, pointed at the whole library instead. The folder path comes through on the item, so you pull the office symbol out of the path and look up the address in a SharePoint list of symbol to email. One flow, and adding an office is a new row rather than a new flow.
Watch attachment size if you're mailing the files rather than linking them. Also worth testing how the trigger behaves when someone drops 50 files at once, it can lag.
3
u/nb292 7d ago
Yes, I have something similar working in our environment.
It’s a little bit different though. We have one main processing folder, the workflow is the actual one to move the files into the appropriate folder and then sends an email with the files attached to a specific user or list of users.