Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 6k12SkSg+NEtV9dvzYzJUL
Power Automate - Building Flows
Answered

'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.

Like (0) ShareShare
ReportReport
Posted on 8 Nov 2024 11:06:49 by 68
Hi Everyone,
I am having an error in my Parse JSON step. I have read all the replies in the forum as well as the external website discussions, but could not come up with a solution/explanation.
I have a JSON file that I use for customer details. For simplicity, I reduced it to two customers, with customer name name and the people to put in to and cc in the email communication:
 
{
  "customers": [
    {
      "name": "Customer 1",
      "to": [
        "contactA@customer1.com",
        "contactB@customer1.com"
      ],
      "cc": [
        "contactC@customer1.com",
        "contactD@customer1.com"
      ]
    },
    {
      "name": "Customer 2",
      "to": [
        "contactE@customer2.com",
        "contactF@customer2.com"
      ],
      "cc": [
        "contactG@customer2.com",
        "contactH@customer2.com"
      ]
    }
  ]
}
 
I checked the JSON, and successfully deserializes.
 
I create a Parse JSON step in Power Automate, click on the "Generate from sample", paste the above JSON and Power Automate successfully generates the schema:
{
    "type": "object",
    "properties": {
        "customers": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "to": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cc": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "to",
                    "cc"
                ]
            }
        }
    }
}
 
Up to this point, everything goes successful, and I can save the flow. But when I it, the flow errors out:
 
The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.
 
Any ideas?
 
Thank you!
 
Tolga
  • tolga-balci Profile Picture
    68 on 11 Nov 2024 at 06:39:08
    'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.
    Thanks a lot Ellis. This clarifies. Many thanks!
  • Verified answer
    Ellis Karim Profile Picture
    10,940 Super User 2025 Season 1 on 09 Nov 2024 at 22:11:49
    'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.
    I think this is happening because during the flow run, the data is not valid JSON.

    I can reproduce the exact same error by providing data that is not valid JSON.  If you try the following sample data for the content of the Parse JSON action:
    Person: { "name": "Alice Smith", "to": ["alice.smith@example.com"], "cc": ["cc.person1@example.com"] }
    It should generate the same error:
     
     
     
    When I try the same flow with your sample data, the flow works without issue.


      
    Please share the screenshot of the Parse JSON action as you see above. Examine the content and check if this is what you are expecting.
     
     
     
    Ellis

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 73

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 66 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard
Loading started