I have a flow that is triggered when a File or Item is modified. It has a trigger condition that causes it to run only when the 'EmailSent' field is false.
In this flow we are checking for the Content Approval to Not = Pending. Once the Content approval has changed, the rest of the flow runs and sends emails and depending on the value starts a flow approval process.
At the end it updates the EmailSent field.
Some of the items this flow runs on has their content approval status set back to Pending. There is no action in the Flow to do this. All it's doing is checking it.
@JR-BejeweledOne so the issue is that content approval is getting set to Pending even if its not Pending after the flow runs? Do you have versioning turned on, on the list? If no, then turn on for a while just to see in version history of what is causing the Status to update, you could see when status is updated and why which user.
The workflow checks the status of the content approval. If it is still pending, then it ends. If it has changed (the change is manual in the SharePoint list), then it proceeds and performs its actions based on approved or rejected. At the end of the workflow it sets the EmailSent field to yes.
That is the only change it is making. In looking at the version history, it appears that the only change between it being approved and then set back to pending is the update of the EmailSent field.
@JR-BejeweledOne can you share the screenshot of the action that updates the EmailSent field? Is it an update item action?
@JR-BejeweledOne i think i understood your issue now, it is SharePoint's functionality that it will change the approval status to Pending if item data changed after it is approved.
As alternate solution you can set the Content approval status to approved from flow after the item update using Set Content Approval Status action