Skip to main content

Notifications

Power Automate - General Discussion
Answered

PARSE JSON content invalid

(0) ShareShare
ReportReport
Posted on by

Im trying to make a cloud flow that splits a pdf based on its content. I have found up to this point that best way to do this is to Parse JSON to identify the text in the file, and then split it. However I am getting an error whenever it Parse's  no matter the content I use, "The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: e. Path '', line 0, position 0.'."

Any ideas to fix this problem or alternate ways to split the pdf without costly connectors would be greatly appreciated.

full flow with error codefull flow with error codeParse JSON and is sourceParse JSON and is source

  • Verified answer
    Re: PARSE JSON content invalid

    The solution to this issue lies in the parse JSON content selection. Instead of selecting 'extracted content file', choose the body of the extracted pdf. this change solves this particular issue.

  • Re: PARSE JSON content invalid

    That is correct, I extracted it into a JSON format then pasted it directly, I have generated it before(from multiple sources) but that gives the same error code.

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: PARSE JSON content invalid

    @Anonymous 

     

    Yea it happens sometimes. One more thing I am seeing is in schema you have directly pasted your data. Instead you should click on generate from sample and paste it there. Then power automate automatically will make your schema.

    Am I correct you directly pasted in the schema rather than pasting it in generate from sample?

  • Re: PARSE JSON content invalid

    It usually is set to the content, however if usually reverts to body on its own for a reason I do not know. Nonetheless, when it is set to content, the error still remains

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: PARSE JSON content invalid

    Hey @Anonymous 

     

    Instead of passing Body in the content action of extract pdf action, can you add the content you are getting from get file content action. I think that will do it for you.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard