Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
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,998 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Automate - Building Flows

#1
David_MA Profile Picture

David_MA 310 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 271 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 253

Overall leaderboard
Loading started