Hello,
I have the following MS Flow:
Sharepoint List > "When an item is created or modified" [This works]
Sharepoint > "Send an HTTP request to Sharepoint" [This works]
- Site address is correct
- Method: GET
- Uri: _api/web/Lists/getbytitle('MyList')/items(@{triggerBody()?['ID']})/versions?$top=2
- Headers: key= accept value=application/json; odata=nometadata
- Body:
Select [This fails]
- From: @{body('Send_an_HTTP_request_to_SharePoint')}
- Map:
- key= ID , value= @triggerBody()?['ID']
- key= Status, value= @triggerBody()?['Status']?['Value']
- key= Version, value= @triggerBody()?['{VersionNumber}']
Fail= BadRequest. The 'from' property value in the 'select' action inputs is of type 'Object'. The value must be an array.
My problem: I don't know how to fix this Bad Request error. This is my first time trying to use a send http request in sharepoint flow like this.
My goal: I want to check last two version to see if the modified field was the Status or not. If it was the Status, then I will use a Switch statement to evaluate the Status change and take appropriate action.
I would appreciate it greatly if someone has a solution to fix this flow or an alternative method that accomplishes the same goal.
Thank you very much.