Skip to main content
Community site session details

Community site session details

Session Id : de5Q0kkqghBC5penLImrHn
Power Automate - Using Connectors
Unanswered

Can't convert File base64ToString

Like (0) ShareShare
ReportReport
Posted on 15 Feb 2021 17:35:38 by 40

Hello, 

 

I'm entering in the real of power automate and i'm loving it, but i've a problem..

I'm trying to convert a file that contain a JSON code and I'm pulling the file from Onedrive Bussines with "Get file Content"

 

The output message from the "Get File content" Action provided my information regarding the $Content-type.

Joao_Macau_0-1613410090174.png

Next i'm using compose, and the flowing formula, to convert the content of the file to do a Parse JSON after. 

 

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

 

 

When i run the flow the following message appears:

" Unable to process template language expressions in action 'Compose' inputs at line '1' and column '5995': 'The template language expression 'base64ToString(triggerBody()['$content'])' cannot be evaluated because property '$content' doesn't exist, available properties are ''. Please see https://aka.ms/logicexpressions for usage details.'. "

 

I know for a fact that I've the "$content'" in my file. why does this error appears? 

 

best regards,

JoĂŁo Macau

 

  • Community Power Platform Member Profile Picture
    on 16 Apr 2022 at 12:30:27
    Re: Can't convert File base64ToString

    This helped bigly. I spent hours trying to import Json from OneDrive, Google drive etc. I tried:

    base64ToString(triggerBody()?['$content'])
    base64ToString(triggerBody()?['$content'])
    json(base64ToString(triggerOutputs()['outputs']['body']['$content']))
    base64ToString(triggerBody()['$content'])

     

    But your solution is the one that worked  for me.

    Thank you.

  • Joao_Macau Profile Picture
    40 on 15 Feb 2021 at 21:16:14
    Re: Can't convert File base64ToString

    Thank very much for the reply!

     

    I've change the flow and the output was something like this:

    "{\u0000\r\u0000\n\u0000 \u0000 \u0000\"\u0000n\u0000a\u0000m\u0000e\u0000\"\u0000:\u0000 \u0000\"\u00005\u0000d\u0000a\u0000a\u00003\u00007\u00003\u0000e\u0000-\u00004\u00002\u00001\u0000a\u0000-\u00004\u00007\u00000\u0000d\u0000-\u00009\u00009\u0000c\u00007\u0000-\u00005\u0000e\u00004\u00006\u00004\u00009\u0000e\u00004\u00006\u00009\u00002\u00004\u0000\"\u0000,\u0000\r\u0000\n\u0000 \u0000 " 

     

    Is this related with encoding?

     

    My original file is the DataModelShema file in a PowerBi.

     

    When I converted it to a .json file it work but I'm trying to use the original file. Is it possible?

     

    best regards,

    JoĂŁo

     

     

     

  • CFernandes Profile Picture
    8,295 Most Valuable Professional on 15 Feb 2021 at 18:10:39
    Re: Can't convert File base64ToString

    Hey @Joao_Macau ,

     

    Try the approch below-

     

    CFernandes_0-1613412540069.png

     

    Get File Content - Infer Content Type > NO

     

    Formula in the compose action  -

     

    base64ToString(outputs('Get_file_content_using_path')?['body']?['$content'])

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Loading complete