Hello Everyone! Hoping to get some assistance. I'm trying to build a flow does accomplishes the following items:
1. Searches for a list of files where the modified date is greater than 6 months for a specific folder. I want it to search in subfolders.
2. Send an email out with the following info: Link to document, Document Name, Document Owner, and Document Path.
3. I DO NOT want to search and email Folder names only the File info inside the folders.
Below is what I have but I'm having a few problems. I keep trying different setup variations but can't come up with everything I need.
Solved! Go to Solution.
Hi @ThisIsIt,
You could follow these steps to achieve your requirements:
Step 1: List folder to get all files of the destination folder.
Step 2: Use the formateDate() function to change the last modified date format into 'yyyy-MM-dd' for the following compare with utcNow.
Step 3: Get file metadata by using path to get the file's item ID, after that, get its sharing link and file properties then send an email.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ThisIsIt
One way of doing this is to use the Get files (properties only), this will return everything in the Document library however then you could use the Filter Array action to filter based on the Path, Modified Date and if the item is a folder or file
Unfortunately the Path option doesn't seem to work in the OData filters (might have something to do with the curly brackets) so a filter array should work for you
Also if you use the startsWith option for filtering the path you should be able to pass in the top sub folder and it should bring in everything below it.
There are 3 parts to the filter so you will need to use the Advanced filter option
This is the whole filter
@and(startsWith(item()?['{Path}'], 'Shared Documents/Test/'),
equals(item()?['{IsFolder}'], false),
lessOrEquals(item()?['Modified'], body('Get_future_time')))
Hi @ThisIsIt,
You could follow these steps to achieve your requirements:
Step 1: List folder to get all files of the destination folder.
Step 2: Use the formateDate() function to change the last modified date format into 'yyyy-MM-dd' for the following compare with utcNow.
Step 3: Get file metadata by using path to get the file's item ID, after that, get its sharing link and file properties then send an email.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you guys for your assistance! I wasn't able to get Gareth1 suggestion to work, and I was able to get v-litu-msft to mostly work. Here's what I'm missing. When I select a folder in from List Folder, I need it to search the subfolders within the Folder selected.
Example: When I select the Finance folder I need to also search for files within the subfolders under Finance. Currently it's only searching for Files in the root of Finance.
Hi @ThisIsIt,
So there is some subfolder in the folder, normally, it is indeed could not get these files within these subfolders by using List folder action, but you can use the IsFolder properties to determine the files extracts from 1-level folder whether folder. If it is a folder, use the List Folder action again to get 2-level folder's files, then repeat these steps in the previous reply, for example:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
23 | |
23 | |
23 | |
17 |
User | Count |
---|---|
57 | |
39 | |
37 | |
29 | |
28 |