Social Corner can get busy and you may want to hide posts from it after 30 days or so (depending the new post volume).
You can set this up with Power Automate–it takes about 5 minutes with these steps below:
-
Open Power Automate from your Microsoft 365 toolbar
-
On the left, click the Create button
then click select Scheduled cloud flow
-
Set Flow recurrence and a name, similar to below:
-
Add a new step
and search for get files
pick Get Files (properties only)
- For Site Address, pick the URL of your Intranet or the site where your Social Corner posts reside
For Library Name, type custom value Site Pages
For Limit Entries to Folder pick the folder you wish to monitor for expiry /SitePages/SocialPosts or if you have a custom feed for employee welcomes then /SitePages/Welcomes
For Include Nested Items set No
And, for Filter Query copy and paste this line
Created le '@{addDays(utcNow(), -30, 'yyyy-MM-ddTHH:mm:ssZ')}'
This last line takes the Created date of the post and calculates 30 days from that date. It will only move items which have passed the 30 days. Feel free to change that number to what you feel is reasonable.
Here is the screenshot of the action:
- Add a new step and search for “each”
select Apply to each
- For Select an output from previous steps pick “value” like this
Then click Add an action
and search for “move file”, like this:
pick Move file
- For Current Site Address pick the same URL you picked in step 5 above
For File to Move pick Identifier like this
For Destination Site Address pick the same URL as for Current Site Address
For Destination Folder pick a folder where you will move expired posts
like this:
(you need to create this folder in SitePages library first)
And, for If another file is already there choose Move with a new name
Here is the screenshot of the step for clarity:
-
Save the flow
-
Test the flow by clicking Test in the top right hand corner
Success run will move files created 30 days ago from SitePages → Welcomes folder to SitePages → Expired. Other files will stay until their time arrives.