web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue parsing a JSON f...
Power Automate
Unanswered

Issue parsing a JSON file from OneDrive for Business

(0) ShareShare
ReportReport
Posted on by 40

I'm having some issues trying to parse a JSON file from OneDrive for Business

 

  • My flow triggers when a new file is created (All files in the folder are json type).
  • I use the next JSON file 
{"Prueba":"Hola mundo"}

 

 

json(base64ToString(trigger()['outputs']['body']['$content']))

 

  • When I run the flow I get the next message:
Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2816': 'The template language function 'json' parameter is not valid. The provided value '{
"Prueba":"Hola mundo"
}' cannot be parsed: 'Unexpected character encountered while parsing value: . Path '', line 0, position 0.'. Please see https://aka.ms/logicexpressions#json for usage details.'.

 

  • I tried using the Parse JSON action having the same results

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @_jesan_ 

     

    Could you please post a screenshot of your flow?  

     

    Thanks

  • Verified answer
    ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    hi @_jesan_  maeby I did what you want

     

    base64ToString(triggerBody()?['$content'])

     

     

    try.PNG

    result.

    ok.PNG 

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at
    Hello @_jesan_

    @ChristianAbata is correct, after doing the steps he posted. You can add another compose action and use the expression:
    json()
    And inside the () you can put the dynamic content of the base64 output.
    Than run the flow, copy the output from the Json expression.
    Now you can add a parse JSON action and use the copied value as the sample payload.

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • _jesan_ Profile Picture
    40 on at

    Hi, I tried your aproach but I get same results

    Imagen2.PNG

    Result:

    Imagen1.PNG

    I noticed there's difference in each output action result when JSON is involved.
    It seems that when a output is identified as a valid JSON the pair "name:value" is shown with color, but when I use the first Compose action it seems that this colors are not shown in the same way.

    Imegen3.PNG

     

  • Verified answer
    _jesan_ Profile Picture
    40 on at

    I've found the problem of the issue.
    The program that creates JSON's files was using a utf-8 with BOM.
    I created another file with flow and noticed this difference that file must be created with utf-8 codification.
    Thanks four your replies.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard