Welcome to SharePoint Simply. I am a non-technical SharePoint person just like you. Follow along while I learn things and help you do them.

Microsoft Flow: 502 Bad Gateway error when creating new SharePoint list item

Time to do this: 1 minute

I was working on a workflow the other day that did something pretty simple:

  • When a new item was created in a SharePoint list

  • Create a new item in another SharePoint list depending on the value of a certain field

I had this working fine and then suddenly I started getting 502 Bad Gateway errors on all my new runs.

Specifically I was getting:

“Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Microsoft.SharePoint.Connector.SPListExpandedReference' because the type requires a JSON object (e.g. {\"name\":\"value\"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {\"name\":\"value\"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath '', line 1, position 1.\r\nclientRequestId: 4dc06be4-1232-47ce-b184-14c02b8ece6e\r\nserviceRequestId: 5972b19e-c0e2-7040-5e41-d418ef20daa7”

Solution: My specific issue was that I had changed a choice column in the destination list from allowing multiple values to only allowing a single value. I updated the “create item” step in the Flow and it worked fine.

SharePoint: List template not working with new items

SharePoint: Listview threshold error even with filtering