I have been playing with Power automate lately and I found it very useful.
I thought about one use case and many others came in mind after this one I confess…
In D365 F&SCM, you can export data into Excel and set up a document type to store the file in a sharepoint folder.
However, the company does not want that folder to become a trash. That’s why, any files older than 7 days could be deleted automatically. Power automate can help us achieve that.
First, set up a recurrence to run the flow automatically
Second, add a element to get all files that are stored in a specific folder
Third, add the following condition :
formatDateTime(item()[‘Created’],’yyyy-MM-dd’) is less than addDays(utcNow(),-7,’yyyy-MM-dd’)
Finally, if the condition is true, add the element to delete the files
More to come !! Stay tuned