cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

When a file is created in a folder, look in a other folder and if there are documents with the same name, send a notification (OneDrive)

Good afternoon; The flow is when a file is created in a folder, look in others folders and if there are documents with the same name or similar, send a notification. Thank you for the help.

4 REPLIES 4
Highlighted
Super User II
Super User II

Hello @AlbaTi 

Please provide more information on what you have tried and where you are stuck, so that we may better be able to help you 🙂

Kind regards, John

Highlighted
Super User II
Super User II

Hello @AlbaTi 

You should do something like this:

OneDrive.png

 

1) When the file is created in OneDrive

 

2) List files in root folder and for each element, check if the element is a folder

3) If the element is a folder, find files in this folder (be careful, using the id of the folder, and not the name). Thanks to @RezaDorrani for this excellent solution (https://powerusers.microsoft.com/t5/Building-Flows/List-files-in-folder-not-working-as-expected/td-p...).

4) If the element is found (length(body('Find_files_in_folder')) > 0 means that at least an item was found)

5) Send an email notification.

In this case, this flow is not a recurring one, and I mean it won't look for the file in subfolders of a specific folder.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Highlighted

Good afternoon; The flow is more hard what is seems like. I have a folder, where do I upload files. I would like, that this flow, browse the name of the files of other folders and subfolders and if this found a similar name, send me a notification. This is to detect duplicates of files. I have tried the flow it sent, but it gives an error:

 

Flow.PNG

Flow 1.PNG

 

Highlighted

Hello @AlbaTi 

Currently it is not supported to search in a folder and its subfolders in O4B. You can vote for this feature here: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Support-for-sub-folders-of-OneDrive-When-a-...

The only solution to your problem should be creating a recursive or nested flow. You can find some ideas at this excellent post by John Liu: http://johnliu.net/blog/2017/7/nested-flow-cheatsheet-for-microsof-flow

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,660)