I have a Flow running on a SPO list with content approval enabled. There is no approval task -- only the action to Set Content Approval. My flow has to update some metadata, which of course sets the Approval Status to Draft. I thought I could use the Set Content Approval action in Flow to force the status back to Approved. (I do have the Get File Metadata action in place immediately beforehand and the Etag is set.) But I get this error:
Solved! Go to Solution.
Hi @RachelRig ,
Would it be possible to provide a print of the full Flow, and show how you are trying to Set Content Approval Status? You need to set Status = Submit.
It could be possible that you would need to preform this action in another stage of the Flow, hence it not working as expected.
Alternatively, if you can always open a ticket to Microsoft Support through here: https://admin.powerplatform.microsoft.com/support if this requires a more in depth Troubleshooting.
I hope this post helped you move forward!
Thank you for your reply. I'm not sure how to get a full print out of the Flow. The action I named "set flags back to 0" is an Update File Properties action. This is an eternal problem I have wrestled with for years. I need to automate the updating of certain file properties with a workflow -- but this conflicts with Content Approval because there is no way to get around the movement back to Draft status. It would be amazing if SharePoint or Flow allowed developers some way around this -- but if not, at least let me force the system-generated Approval Status (Moderation Status) back to Approved after my property updates are done. I assumed that the Action field here should be set to "Approve" -- but I will try it with "Submit" as you suggest.
In another discussion thread from 2018, I saw a Microsoft employee telling someone that the Set Content Approval action is not supported for SharePoint. Don't know if that is accurate, but many people seem to be having trouble with SharePoint content approval. It makes no sense that Flow has an action that is SharePoint-specific and is named "Set Content Approval Status" -- but that somehow has no relationship to the content approval status. (?!?) What is it for then? Is there some trick I am missing?
Hi @RachelRig ,
I found this solution in several online posts which could prove to be useful to you as well:
On both of them when facing the same error message as you did the solution was to change it to submit so i think its worth a try.
As for the Set content approval not being supported by SharePoint i believe this is a misunderstanding. If you read our internal documentation on this action of the connector you can read the following:
"This action is only available for SharePoint Online and SharePoint 2019"
So i would assume that maybe this was the point of my colleague when explaining this point.
As for the issue with automating the update of file properties with Flow and the conflict with Content Approval, if you like to have this feature implemented you can suggest it in Power Automate Ideas Forum this way if it gets enough upvotes the Product Group will take a look at your request and see if its something they can implement. I can assure you that they do indeed look at this since they are constantly bringing new updates to both Power Automate and Power Apps and they get many of their suggestions from here.
If you like you can share the idea here and I can upvote it to help spread this request.
Hope this information was useful to you!
Thank you, Ricardo! I finally got it figured out. So you were saying I need to Submit first -- and that put the doc into Pending status. Then I had to repeat the Get File Metadata - Set Content Approval Status pattern a second time to go from Pending to Approved. It's a lot of steps, but it works!
Now, I have to add yet another "flag" column to my library so that I can stop this workflow from running in an infinite loop. Thank you very much for your help.