cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spitzbirne
New Member

If Sharepoint folder is older than X month, notify via outlook mail

We have a SharePoint site where users create folder in the document library to share them. As we expected, they forget to delete them after they are no longer needed.

Therefor we want to create a flow which checks once per month if a folder is older then 4 months and if so, send an email to the creater of the folder.

 

I'm a total rookie in terms of power automate and only used templates so far 😁 so please keep that in mind while answering

 

Any help is appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @spitzbirne ,

you can refer to the following article in order to get the folder owner:

 

https://www.c-sharpcorner.com/article/sharepoint-rest-api-in-power-automate-ms-flow/

 

Please let me know.

 

BR,

Marco

View solution in original post

3 REPLIES 3
MarconettiMarco
Resident Rockstar
Resident Rockstar

Hello @spitzbirne ,

please follow these steps:

- Trigger: Recurrence 1 per Month:

MarconettiMarco_0-1656503280680.png

- add "List Folder" action, from which you'll retrieve all the SP folders in a specific path:

MarconettiMarco_1-1656503332943.png

- then add "Get folder metadata putting the Folder ID in File identifier from the previous action (the system will automatically add the Apply to each control):

MarconettiMarco_2-1656503388139.png

- then add a "Compose" action in which you have to add the following expression:

formatDateTime(outputs('Get_folder_metadata')?['body/LastModified'],'dd-MM-yyyy')

MarconettiMarco_3-1656503456810.png

- then add another "Compose" action in which you have to add the following expression:

formatDateTime(addDays(utcNow(),-120),'dd-MM-yyyy')

- finally add the Condition control in which you have to specify the first "Compose" outputs with the second one. The operator should be "is less than or equal to":

 

MarconettiMarco_5-1656503578016.png

 

In the Yes branch you can add the "Send an email" action.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

BR,

Marco

 

Hello @MarconettiMarco 

 

many thanks for your reply. I just followed your steps to rebuild the flow and tested it with a "send an email" with me as receiver action as you said.

 

80% of my question is solved. 

Whats left is that the ones that created the folder should get the email. I already had a look at the dynamic recommendations power automate gave me but none of them do the trick.

Unbenannt.PNG

Hi @spitzbirne ,

you can refer to the following article in order to get the folder owner:

 

https://www.c-sharpcorner.com/article/sharepoint-rest-api-in-power-automate-ms-flow/

 

Please let me know.

 

BR,

Marco

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,359)