Hey all, I'm receiving an error while using the "Add row into Excel table" action in Automate.
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.'
The following screenshot shows my input, namely for the row where I'm unsure anything is wrong.
The flow otherwise pulls CSV data, formats it, creates an Excel file, adds a table to the Excel file, and then uses that data dynamically to input these rows into the table. I'm unsure what's going wrong. I saw another post with a similar error saying that Microsoft restarting a worker thread resolved the issue, so I don't know exactly what to do. I have already tried importing the flow into a separate environment and received the same error.
Do let me know if I can provide any additional information.
Thanks in advance!
I don't know either as it worked for me without issues. Try troubleshooting:
My apologies, I seem to be continuing to cause trouble! I truly don't understand why this is happening. As far as I can tell the names are identical. Is it an error by passing the table name as a string?
If you use the table name property from the "Create Table" action it works.
When I try to pass the table name it fails and I get back
No table was found with the name 'Table1'.
which seems quite apparently faulty.
I did a test and found the issue. You are passing the table object not the table name to the "Table" property.
Thanks for the reply. See the following screenshot:
So my flow creates the Excel file from a template blank file and uses the "Create table" action to make the new table with column names. Since this table is created each time the flow runs, the Table listed in the dropdown for the inserting rows action no longer works (different IDs?). Thus I am passing the output from "Get tables" immediately following the Create table action.
I say this because when you bypass the dropdown list of tables, it obviously can't grab column names and so I have to pass the data manually in the Row field as shown.
Thanks for looking into this for me.
How are you passing a JSON to it? When I tried here it loads the columns of the Excel table as individual fields in the action (see Field 1, field 2).
Hi Jcook, thank you very much for the response.
{
"host": {
"connectionReferenceName": "shared_excelonlinebusiness",
"operationId": "AddRowV2"
},
"parameters": {
"source": "me",
"drive": "b!qSjDauf9",
"file": "01UWJBHPEEHD",
"table": {
"@odata.id": "/drives('b%21qSjDauf9N')/items('01UWJBHPGF')/workbook/tables(%27%7B3FF735F8-EA)",
"style": "TableStyleMedium2",
"name": "Table1",
"showFilterButton": true,
"id": "{3FF735F8-EA2E-4E89-B9D9-1559EDCA0180}",
"highlightLastColumn": false,
"highlightFirstColumn": false,
"legacyId": "1",
"showBandedColumns": false,
"showBandedRows": true,
"showHeaders": true,
"showTotals": false
},
"item": {
"Row Counter": "1",
"Fake Name": "Thomas Merv",
"Fake EID": "1860"
}
}
}
I have obfuscated some of the fields for privacy but left the formatting intact.
Thanks for the reply and for any other pieces of advice you can give.
Hello @abowen
The error message suggests that the data you're trying to send as JSON to the "Add row into a table" action isn't properly formatted. It seems there's an unexpected character '@' in the JSON.
This might be due to:
1. An incorrectly formatted JSON: Ensure the JSON you're sending follows the correct format. If you're manually writing JSON, consider using a JSON validator to catch any syntax issues.
2. Special characters not being escaped: If your JSON includes special characters, they need to be properly escaped. For instance, if '@' is part of a string in your JSON, it should look like `"example@domain.com"`, not `example@domain.com`.
3. Incorrect headers: Ensure you're setting the correct Content-Type headers in your HTTP request. For JSON, the Content-Type should typically be set to `application/json`.
Please check the data that's being sent in this action to ensure it's valid JSON. If possible, consider logging or outputting this data for inspection.
Hello @abowen
The error message suggests that the data you're trying to send as JSON to the "Add row into a table" action isn't properly formatted. It seems there's an unexpected character '@' in the JSON.
This might be due to:
1. An incorrectly formatted JSON: Ensure the JSON you're sending follows the correct format. If you're manually writing JSON, consider using a JSON validator to catch any syntax issues.
2. Special characters not being escaped: If your JSON includes special characters, they need to be properly escaped. For instance, if '@' is part of a string in your JSON, it should look like `"example@domain.com"`, not `example@domain.com`.
3. Incorrect headers: Ensure you're setting the correct Content-Type headers in your HTTP request. For JSON, the Content-Type should typically be set to `application/json`.
Please check the data that's being sent in this action to ensure it's valid JSON. If possible, consider logging or outputting this data for inspection.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional