cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
EthanSSEH
Level: Powered On

If conditions are met, restore previous version of sharepoint calendar event using Sharepoint HTTP Request

Hi all,

 

*PLEASE EXCUSE the cluttery start to my flow, I was experimenting with a few different options for this problem early on and it still needs cleaning up*

 

I currently have a flow which looks for modifications in events within a sharepoint calendar (when an item is created or modified). Content approval is active on this calendar so therefore once a changed is made the status of the event is turned to pending. The aim of the flow is to automate the event editing process, such that if changes are approved or denied they are automatically updated or restored to their previous version with no manual input in the SP calendar.

 

The approval side is easy enough. The rejection side is proving challenging.. 

 

Current Flow State:

The flow spots a change or event creation and triggers.

 

Using a HTTP request I have been able to extract the {ModerationStatus} of the event and I have set this as a condition in the flow such that if ModStatus = 2 (pending) it will start an approval request. I have done this by writing the status to excel, and setting up an IF statement converting the numbers into their appropriate state.

 

My idea from here was to use a condition stating if the approval status was "reject" the event should be reverted back to its previous version. I have seen people use a similar method to perform similar operations.

 

Using excel I was able to get the (version number - 1.0) but was at a complete loss when trying to get this to restore that version number via HTTP request. I need the end of my flow, if the approval status is "reject", to revert the event back to its previous version so that there is no-need for manual restoration via the sharepoint site.

 

I think the issue is occuring due to my of knowledge in how to populate the rows below.

My questions are:

1) Using this flow can I and how do I restore an the (n-1) version of the event?

2) If I need to use the HTTP request to do the above, how do I do it?

flowpt4.PNGHow do I populate this?

The rest of the flow is shown below (I had to colour out some details for obvious reasons), but any help would be massively appreciated!

 

 

flowpt1.PNGflowpt2.PNGflowpt3.PNG

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: If conditions are met, restore previous version of sharepoint calendar event using Sharepoint HTTP Request

Hi @EthanSSEH,

 

Maybe Reverted back to its previous version you can have a reference on this post - Restore previous document version and delete current on SharePoint:

https://powerusers.microsoft.com/t5/Building-Flows/Restore-previous-document-version-and-delete-curr...

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,427)