Search code examples
sharepointpower-automate

Update a Row Failed using Power Automate - Error: BadRequest


I am attempting to update an excel table by mapping data from a Sharepoint List. It appears to be pulling the data correctly but the Action still fails.

Here is the Input:

{
    "host": {
        "connectionReferenceName": "shared_excelonlinebusiness",
        "operationId": "PatchItem"
    },
    "parameters": {
        "source": "groups/9c178d5e-af1f-4a58-abe1-c9bbb8b82a21",
        "drive": "b!IYB5sGeARka0pqmmsZFjNYxCav5wmjhLrBJi2_jk_0XWhwFV-v4bQos_AMJjEalP",
        "file": "Shared Documents/General/MySite Files/HereWeGOAgain.xlsx",
        "table": {
            "@odata.id": "/drives('b%21IYB5sGeARka0pqmmsZFjNYxCav5wmjhLrBJi2_jk_0XWhwFV-v4bQos_AMJjEalP')/items('01DCW6CZMWNMDFIAAUHRD2ATH6WSHBSERU')/workbook/tables(%27%7B4C1941E9-7DA2-40B3-BBB2-3A473BE7FA86%7D%27)",
            "style": "TableStyleMedium2",
            "name": "Table1",
            "showFilterButton": true,
            "id": "{4C1941E9-7DA2-40B3-BBB2-3A473BE7FA86}",
            "highlightLastColumn": false,
            "highlightFirstColumn": false,
            "legacyId": "1",
            "showBandedColumns": false,
            "showBandedRows": true,
            "showHeaders": true,
            "showTotals": false
        },
        "idColumn": "Submitted by",
        "id": "Terricka Gregg",
        "item": {
            "Discipline": "Gas Ops",
            "Supervisor": "Wesley Summers",
            "Team-Shift": "Gas Team 2"
        }
    }
}

Here is the error from Power Automate:

BadRequest. Http request failed: the content was not a valid JSON. Error while parsing JSON: 'After parsing a value an unexpected character was encountered: @. Path 'message', line 1, position 71.'

I've researched the documentation for the action and I can't seem to figure out what's wrong. The rows simply should be updating with information. I appreciate any advice with this one.

Flow 1

[Flow 2][2]

Flow 3

Flow 4

Flow 5 Flow 6 Flow 7


Solution

  • enter image description here

    Generally speaking, the name of the Table should be placed here, but you put the record currently traversed. (Have you tried using a compose to output it? It seems to me that the data types here are inconsistent) Since your path is dynamic, the table name needs to be filled in manually. We can check the corresponding table name like this: enter image description here