Skip to main content

Notifications

Community site session details

Community site session details

Session Id : mNppeU1qHrCswLj5w9wF9+
Power Automate - General Discussion
Unanswered

Http request failed: Error parsing JSON, unexpected character @.

Like (1) ShareShare
ReportReport
Posted on 20 Jun 2023 15:54:54 by 222

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.

abowen_0-1687275851745.png

 

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! 

 

  • hrangel-gg Profile Picture
    173 on 23 Jun 2023 at 17:59:56
    Re: Http request failed: Error parsing JSON, unexpected character @.

    I don't know either as it worked for me without issues. Try troubleshooting:

    1. Check if the table was created in the file
      1. Check the table name in the Excel, does it match the WF?
    2. Run the add row separately to see if it works after X minutes
      1. Try to adding the table name on a compose and using it from there
      2. Try with the table name and display name and see if there's any change
    3. Use a different Excel file, with only two columns, without space (similar to what I did)
    4. Try to use a file from SharePoint instead
  • abowen Profile Picture
    222 on 22 Jun 2023 at 19:45:05
    Re: Http request failed: Error parsing JSON, unexpected character @.

    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? 

    abowen_1-1687463054884.png

     

     

  • hrangel-gg Profile Picture
    173 on 22 Jun 2023 at 19:39:51
    Re: Http request failed: Error parsing JSON, unexpected character @.

    If you use the table name property from the "Create Table" action it works.

    hrangelgg_0-1687462720739.pnghrangelgg_1-1687462730305.png

     

  • abowen Profile Picture
    222 on 22 Jun 2023 at 16:56:40
    Re: Http request failed: Error parsing JSON, unexpected character @.

    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. 

    abowen_0-1687452987357.png

     

  • hrangel-gg Profile Picture
    173 on 22 Jun 2023 at 16:49:52
    Re: Http request failed: Error parsing JSON, unexpected character @.

    I did a test and found the issue. You are passing the table object not the table name to the "Table" property.

     

    hrangelgg_0-1687452546102.png

     

  • abowen Profile Picture
    222 on 21 Jun 2023 at 15:02:17
    Re: Http request failed: Error parsing JSON, unexpected character @.

    Thanks for the reply. See the following screenshot:

    abowen_0-1687359501323.png

     

    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.

  • hrangel-gg Profile Picture
    173 on 20 Jun 2023 at 22:21:15
    Re: Http request failed: Error parsing JSON, unexpected character @.

    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).

     

    hrangelgg_0-1687299449762.png

    hrangelgg_1-1687299642783.png

     

     

  • abowen Profile Picture
    222 on 20 Jun 2023 at 17:14:46
    Re: Http request failed: Error parsing JSON, unexpected character @.

    Hi Jcook, thank you very much for the response. 

     

    1. I quickly used an online JSON validator. The JSON I'm passing to the row as input is valid. It can also be seen in my original screenshot, if that helps.
    2. I do not believe any special characters are being used incorrectly or not escaped correctly. However, I am new to JSON formatting so I could be wrong in this. I will paste the entire JSON file being passed to the Add Row action below.
    3. Similarly to above, I'm not great at JSON conventions thus far so I will paste the JSON file below. 
    {
     "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.

  • Jcook Profile Picture
    7,770 Most Valuable Professional on 20 Jun 2023 at 16:44:48
    Re: Http request failed: Error parsing JSON, unexpected character @.

    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.

  • Jcook Profile Picture
    7,770 Most Valuable Professional on 20 Jun 2023 at 16:44:40
    Re: Http request failed: Error parsing JSON, unexpected character @.

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started
Loading complete