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

Get Changes for an item or file BadGateway Error

I am new to PowerAutomate automated SharePoint flows. I have created two workflow to automate approvals for documents stored in our library. The first workflow for new files is working perfectly. There are different approvals for a revision of a document, and I am struggling on this second flow. I created a trigger for when a file is modified (this trigger works correctly) and then I want to get the changes for the document to see if the body of the file has changed (vs the metdata tags).  I am receiving a 502 Error Bad Gatway and I am not sure what I've done wrong.

 

NewToFlows_0-1643383754667.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @NewToFlows,

I recommend you use the Sent HTTP request to SharePoint action instead to get previous version, there is a blog introduced how to use it, hope it could help you:

Check for a Change in a SharePoint List Column Val... - Power Platform Community (microsoft.com)

 

In addition, you could check your SharePoint list settings and see if the modified items are the issue to affect your version.

Best Regards,
Qi

View solution in original post

2 REPLIES 2
NewToFlows
Frequent Visitor

The errors I am getting are:

 

{
  "error": {
    "code"502,
    "source""unitedstates-002.azure-apim.net",
    "clientRequestId""aca8c3d7-034a-4058-b748-beff57efbf1f",
    "message""BadGateway",
    "innerError": {
      "status"500,
      "message""Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index\r\nclientRequestId: aca8c3d7-034a-4058-b748-beff57efbf1f\r\nserviceRequestId: aca8c3d7-034a-4058-b748-beff57efbf1f"
    }
  }
}

Hi @NewToFlows,

I recommend you use the Sent HTTP request to SharePoint action instead to get previous version, there is a blog introduced how to use it, hope it could help you:

Check for a Change in a SharePoint List Column Val... - Power Platform Community (microsoft.com)

 

In addition, you could check your SharePoint list settings and see if the modified items are the issue to affect your version.

Best Regards,
Qi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,816)