Dmitriy Ryabin
Dmitriy Ryabin

Reputation: 468

Power automate errors when updating sharepoint list item, but item does get updated

Please, help. Power automate flow that is doing a few things, and at the end checks the Sharepoint list and if it finds an item, it should update the item. If it does not find it, it should create it.

So, first, when I know the item is NOT there in the list, Checking for an item, "Get Items" step returns an error

The API 'sharepointonline' returned an invalid response for workflow operation 'Get_items' of type 'OpenApiConnection'. Error details: 'The API operation 'GetItems' is missing required property 'body/value/0/Location'.'

Please, note the value/0/

The Get Items input is the following

{
    "host": {
        "connectionReferenceName": "shared_sharepointonline",
        "operationId": "GetItems"
    },
    "parameters": {
        "dataset": "https://<domain>.sharepoint.com/sites/<siteName>",
        "table": "7de34a0a-3343-dcdk-c9",
        "$filter": "Title eq '2450002'"
    }
}

If I use the same input in another dummy power automate flow, I get no error, and just an empty dataset is returned (as expected)

Then, as a step 2, I check my main flow, with the item, that I know is in the list, and the 1st step ("Get items") works fine, but then the "Update Item" step returns an error

The API 'sharepointonline' returned an invalid response for workflow operation 'Update_item' of type 'OpenApiConnection'. Error details: 'The API operation 'PatchItem' is missing required property 'body/Location'.'

Please, note the 'body/Location' with NO /0/ array index in it ... I don't know if it matters, but it caught my eye.

The "Update Item" step is like this

enter image description here

with "Address" field mapped to the field named "Location" in the SharePoint List.

Checking the list shows that item did get updated.

Power automate flow is being called automatically ('When Http Request is received') and this error messes up the response that is expected by downstream consumption.

Upvotes: 0

Views: 47

Answers (0)

Related Questions