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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse JSON file Attach...
Power Automate
Answered

Parse JSON file Attached in email

(0) ShareShare
ReportReport
Posted on by 8

Hello I have an email with a JSON file attached.

Here is the content of the file

{
"Releases": {
"Path64: "/Test/Test/Test Ver. 1.0 64-bit.zip",

"Version": "1.0",
"Path32": "/Test/Test/Test Ver. 1.0 32-bit.zip",
"Product": "Test"
}

 

My flow is very simple - all I want to do is grab this email, parse the attachment content into JSON using Parse JSON action.

barathibaburaj_0-1658984864906.png

 


}

 

The issue though is the JSON file content gets converted to a blob content type: application/octet-stream. And Parse JSON throws an error. I have also tried extracting the content of the attachment and converting them to base64string prior to invoking parse json - unfortunately the issue is the same.

Here is a snapshot of the error, the input content is in an octet stream format. I generated the schema using my json file - but I am still getting this error. Am I doing something wrong? Is there any other way to get this working?

barathibaburaj_1-1658985176606.png

 

 

 

 

Categories:
  • Verified answer
    Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    Hi @barathibaburaj,

     

    The attachment is encoded:

    Snag_176818ce.png

    You can use the following expression to decode the attachment to plain text:

     

    decodeBase64(items('Apply_to_each')?['contentBytes'])

     

     

    Snag_175fef35.png

     

    Snag_17631701.png

    Snag_17634342.png

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • barathibaburaj Profile Picture
    8 on at

    Thanks @ekarim2020 . Your solution worked but the data post decoding contains special characters. Could you share your json file. I am not sure if mine has become corrupt. I tried the above solution with a simple json file and it worked but with the existing file I have it is showing special characters.

    barathibaburaj_0-1659378868168.png

     

     

     

  • Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    ekarim2020_0-1659381394973.png

    The JSON file is saved as a plain text file using Notepad:

     

    ekarim2020_1-1659381461408.png

     

    This is the content:

    {
     "Releases": {
     "Path64": "/Test/Test/Test Ver. 1.0 64-bit.zip",
     "Version": "1.0",
     "Path32": "/Test/Test/Test Ver. 1.0 32-bit.zip",
     "Product": "Test"
     }
    }

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • barathibaburaj Profile Picture
    8 on at

    Thank you so much @ekarim2020.

    The issue was when I edited the file in NotePad++ the encoding changed to UTF 16 BE BOM causing the issue.

    Once I modified that to ANSI or UTF8 it worked as expected.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard