cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmarc1221
Frequent Visitor

SharePoint - Document Library Approval Flow - Set Content Approval Status Fails

Hello,

 

I am trying to set up a very basic approval flow on a SharePoint document library. I have followed this walkthrough for guidance: https://www.youtube.com/watch?v=3shHcIgjxH4

 

A few of the O365 variable names/actions have changed since that video was uploaded. The approval task is created without a problem, but when I go to approve/reject it, I get an error.

 

I've attached some screenshots of the my flow settings below. It seems like it should be a relatively easy flow to setup, but I cannot get it working for the life of me.

 

Here is the error I am getting:

 

{"Etag":"\"{1289207F-0C22-4056-9AD8-D53E174E4FA5},3\"","Message":"The ETag of this item does not match the one used for setting content approval status. The contents of the item may have changed before the action was completed.","Succeeded":false,"ApprovalErrorCode":"etagMismatch","ApprovalLink":"https://sharepoint.com/sites/test/I%20Spy%20Impact%20Template/impact-whitebg_400x400.png?etag=%22%7b..."}

clientRequestId: 26e2f611-96f0-40ea-97bc-d9fae3711c8d

serviceRequestId: 6909c69e-e0dd-8000-e5e9-d15020599740

 

 

SS1.pngSS2.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @jmarc1221 ,

 

I did a test on my side and created the same Flow, but I didn't see the problem you mentioned.

It seems that your configuration is no problem, it may be that the way of testing is not correct.

 

I noticed that the number at the end of Etag is 3, which indicates that the content approval status of this item is already Approved or content have changed, so this error occurs when Set content approval status action is executed.

 

  • Please try uploading a new file for testing. Do not click on Using data from previous runs to test Flow.
  • When the file is uploaded, observe whether Approval Status of the file is Pending. Only when it displays Pending, it makes sense to execute Set content approval status action.
  • To see if Flow run history has a successful execution, you can click to view it. I did a test on my side. If it is a newly created or uploaded file, the number at the end of Etag will be displayed as 2.

 

Please take a try and feel free let me know if issue still exists.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I figured it out. I had a SharePoint workflow updating a column immediately after items in the library were created, so I ended up putting a delay in the flow for 1 minute before the Get metadata action. That seemed to fix it. Thanks

View solution in original post

5 REPLIES 5
v-bacao-msft
Community Support
Community Support

Hi @jmarc1221 ,

 

I did a test on my side and created the same Flow, but I didn't see the problem you mentioned.

It seems that your configuration is no problem, it may be that the way of testing is not correct.

 

I noticed that the number at the end of Etag is 3, which indicates that the content approval status of this item is already Approved or content have changed, so this error occurs when Set content approval status action is executed.

 

  • Please try uploading a new file for testing. Do not click on Using data from previous runs to test Flow.
  • When the file is uploaded, observe whether Approval Status of the file is Pending. Only when it displays Pending, it makes sense to execute Set content approval status action.
  • To see if Flow run history has a successful execution, you can click to view it. I did a test on my side. If it is a newly created or uploaded file, the number at the end of Etag will be displayed as 2.

 

Please take a try and feel free let me know if issue still exists.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I figured it out. I had a SharePoint workflow updating a column immediately after items in the library were created, so I ended up putting a delay in the flow for 1 minute before the Get metadata action. That seemed to fix it. Thanks

View solution in original post

Can you please share how you added a 1 min delay , would it be possibble to share screen shots or step by step instructions ,  i am facing similiar issue.

Just read the file meta data before your approval step and use the Etag from the meta data in your approval step, that will approve the latest version.

 

I had the same issue that I created a file, updated it, and then tried to approve it based on the Etag from the Create file step and at that point the Etag is not the correct one anymore due to my update.

 

Kind regards, John

This is what worked for me, all my problems were resolved by calling meta-data directly before doing the approval update.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,929)