Logic App Cannot Process DOCX File - "File Is Corrupted" Error - Works from Intelligence Studio

Alvaro 20 Reputation points
2025-06-06T07:52:05.9366667+00:00

Hello,

I'm encountering an issue where the same .docx file is successfully processed in Document Intelligence Studio, but when I attempt to process the exact same file using a Logic App workflow, I receive an error stating that the file is corrupted.

This is unexpected, as the file opens without issues in the Studio and downloads properly from the storage account. The Logic App is using a connection to Azure Blob Storage, and I’ve confirmed that the blob is accessible and intact.

Steps to reproduce:

Upload a valid .docx file to Azure Blob Storage.

Use Document Intelligence Studio to analyze the file — works successfully.

Trigger a Logic App to process the same file — fails with a "file is corrupted" error.

Please advise on why Logic Apps might interpret the file as corrupted, and how to resolve this issue.

Thank you.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,543 questions
0 comments No comments
{count} votes

Accepted answer
  1. Loknathsatyasaivarma Mahali 2,740 Reputation points Microsoft External Staff Moderator
    2025-06-06T09:07:21.02+00:00

    Hello Alvaro,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    After investigating the issue, we identified the root cause — the model name used in the request was "Layout" instead of the correct "prebuilt-layout". This mismatch led to the failure when processing the file.

    Interestingly, when a PDF file was tested, the system returned a clear error indicating the model name was invalid. However, with a DOCX file, the error message reported the file as "corrupted," which was misleading and made the issue harder to diagnose.

    We've corrected the model name, and this resolves the problem. Sharing this clarification to help avoid similar confusion in the future. Let us know if you need further assistance.

    Thank you again for your time and patience throughout this issue. 

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Alvaro 20 Reputation points
    2025-06-06T08:27:57.43+00:00

    I found the root cause. I was using the model name "Layout" instead of the correct "prebuilt-layout".

    Interestingly, when I uploaded a PDF file, the error clearly indicated that the model was invalid. However, with a DOCX file, the error message said the file was corrupted, which was misleading.

    Just sharing this in case it helps others encountering similar behavior. Thank you!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.