Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello everybody, I would like to get some insight on the following issue.
I have a simple Power Automate/Logic App flow that is supposed to upload a PDF file (coming in as an attachment of an email) to a Fabric lakehouse. Here is the entire flow: Entire flow
I use a 2-step process that is described by the Azure Data Lake Storage Gen 2 REST API documentation: first I create an empty file in the lakehouse folder with the ?resource=file parameter added to the HTTP request (HTTP request created with a Compose component): Compose component setup
First HTTP request with PUT method
Then I assemble another HTTP request (this time PATCH method, using the append and flush actions together, then adding the byte contents of the file to the request body): Second HTTP request with PATCH
For the HTTP requests, I'm using the HTTP with Microsoft Entra ID (preauthorized) connectors.
The result is seemingly correct, because something is uploaded to the lakehouse, however it is bigger in size than the original file (3MB instead of 2MB). This might not seem like a big problem, but when trying to process the file (in my case split it up into its individual pages - pagination), the process fails. Therefore something in the file is being corrupted.
Now the question is: how to upload this binary file to the lakehouse without any bloat added to it by Power Automate?
Here is some documentation I've followed: https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update?view=rest... https://www.linkedin.com/pulse/how-call-onelake-api-from-power-automate-enterprise-app-nigel-smith-4...
So I've read up quite a bit on this and here are the possible answers so far:
Here is the link to the StackOverflow question: https://stackoverflow.com/staging-ground/79425706
Solved! Go to Solution.
Hey @v-saisrao-msft ,
Thank you for following up on this!
Well, this specific issue is still not solved but I have found a workaround (which is an understatement): We load the email attachments to an Azure Blob Storage via Logic App, and then we initiate a data pipeline in Fabric that reads all files in this given Blob Storage Container and copies them to the lakehouse's Files section. From this copy, the files arrive without any corruption and can be further utilized and processed (meaning pagination and processing by Document Intelligence service).
I have also created a ticket with Microsoft Support and we are still in discussion about how to resolve the issue of corrupting the files in Power Automate.
So if it is possible, please don't close this topic yet, because if we find a solution, I would like to post it, I'm sure it will be helpful for others as well.
Thank you!
Hi @csana23,
Could you please confirm if the issue was resolved after raising a support case? If so, we’d appreciate it if you could share the solution to help others in the community. As we haven’t heard back, we’re closing this thread. For any further issues, please raise a new thread in the Microsoft Fabric Community Forum — we’ll be happy to assist.
Thank you for being part of the Microsoft Fabric Community.
Hi @csana23,
We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.
Thank you.
Hey @v-saisrao-msft ,
Thank you for following up on this!
Well, this specific issue is still not solved but I have found a workaround (which is an understatement): We load the email attachments to an Azure Blob Storage via Logic App, and then we initiate a data pipeline in Fabric that reads all files in this given Blob Storage Container and copies them to the lakehouse's Files section. From this copy, the files arrive without any corruption and can be further utilized and processed (meaning pagination and processing by Document Intelligence service).
I have also created a ticket with Microsoft Support and we are still in discussion about how to resolve the issue of corrupting the files in Power Automate.
So if it is possible, please don't close this topic yet, because if we find a solution, I would like to post it, I'm sure it will be helpful for others as well.
Thank you!
Hi @csana23,
I would like to confirm if you were able to resolve the issue after raising the support ticket.
If so, please provide the insights and accept it as a solution.
Hi @csana23,
Thank you for providing this update. It's great to hear that you've opened a ticket with Microsoft Support on this matter. We will keep this topic open, as your insights and any resolution could be valuable to others facing similar challenges.
Thank you.
Hey @v-saisrao-msft,
Thank you very much for the quick help!
I will implement these steps and get back to you with my findings!
hello, I am using same flow. My issue is that PDL file is getting created but is blank. Flow works for text file but not for PDF, image. can someone help on this?
Hi @csana23,
Thank you for reaching out to the Microsoft Froum Community.
It appears that Power Automate might be altering the binary content of your PDF file during the upload, which is causing the file size to increase and leading to corruption issues. To ensure the file is transferred correctly, please follow these key steps:
Since uploading manually to the Lakehouse results in the correct file size, this suggests that Power Automate is modifying the content in some way.Comparing the manually uploaded file with the one from Power Automate can help identify differences.
Utilize the "Run history" feature in Power Automate to review the precise output of your email trigger. This will assist in verifying whether the attachment content is base64-encoded and ensure the correct path is followed.
If this post helps you, please mark it as the solution and give a kudo so that other members of the community can easily find it helpful.
Thank you.
Hey @v-saisrao-msft,
Thank you for the tips, I implemented the process you suggested, here are my findings!
Initialized a variable in the flow to capture the attachment output of the Outlook trigger and it really is a base64-encoded string sequence:
The size of the attachment content in bytes after retrieving it with the Attachment Content parameter is
length(base64ToBinary(item()?['contentBytes']))sub(div(mul(item()?['size'], 3), 4), if(endsWith(item()?['contentBytes'], '=='), 2, if(endsWith(item()?['contentBytes'], '='), 1, 0)))
Hi @csana23,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @csana23,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @csana23,
Sorry for the delayed response and thank you for your patience. Thank you for providing detailed information about your findings and the steps you've taken thus far.
If this post helps you, please mark it as the solution and give a kudo so that other members of the community can easily find it helpful.
Thank you.