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 / Convert Word to PDF , ...
Power Automate
Suggested Answer

Convert Word to PDF , Error "Unsupported media type"

(0) ShareShare
ReportReport
Posted on by 30
I have this flow to create a word document, do a delay for 1 minute, get the file content , then convert the file to PDF:-
 
 
 
 
but on the convert action i am getting this error:-
 
{
  "status"415,
  "message""Unsupported media type. You may check if its a restricted document. \r\nclientRequestId: 1ce56d7c-5a21-4acb-95ee-23e7e04ef02d",
  "error": {
    "message""Unsupported media type. You may check if its a restricted document. "
  },
  "source""wordonlinebusiness-we.azconn-we-003.p.azurewebsites.net"
}
Categories:
I have the same question (0)
  • Suggested answer
    MParikh Profile Picture
    488 Super User 2026 Season 1 on at
    The error shows the Word document file is being treated as an "unsupported media type" when trying to convert to PDF. This happens because the file content isn't being passed correctly.
     
    Fix the flow:
     
    Check "Get file content" action outputs
    The output should be File Content (binary data)
     
    Don't use File content (string) or other outputs
    Update "Convert Word Document to PDF" inputs
     
    For the File parameter, use the dynamic content from "Get file content"
     
    Make sure you select the correct output: File Content (not wrapped in any expression)
    Verify file metadata
     
    In "Get file content", ensure you're getting the actual .docx file
     
    Check the file isn't corrupted or in an older Word format (.doc)
     
    Common mistakes:
    Using Get file content using path instead of Get file content
     
    Selecting wrong dynamic content (like file identifier instead of file content)
     
    Missing the binary file content and passing text/metadata instead
     
    Quick test:
    Add a "Compose" action after "Get file content" to inspect what you're getting. Output the File Content and check if it shows binary data or an error.
     
    If the file source is SharePoint, make sure you're using the SharePoint connector's "Get file content" action, not OneDrive or other services.
  • CU31101829-0 Profile Picture
    30 on at
     
    I tried to  to pass the file content returned from the "Get File Content" to the convert action instead of passing the file name, but still the same error...
  • Suggested answer
    WarrenBelz Profile Picture
    155,291 Most Valuable Professional on at
    I will add one of my prod Flows that does exactly what you are doing
     
     
    Top item is a normal Word merge using a Template (I assume the same as yours). I then create a temporary .docx file in OneDrive and convert the content of that to PDF.I then use the content of the PDF output for whatever I need.
    You do not need the delay and seem to be missing the file creation step. 
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
     
  • CU31101829-0 Profile Picture
    30 on at
    @WarrenBelz i ma uisng the "Create word document with the given content", where the content is an HTML table:-
     
  • Suggested answer
    MParikh Profile Picture
    488 Super User 2026 Season 1 on at

    The suggested solutions show the right approach, but they're missing a critical piece. The issue is how you're passing file content to the Word to PDF converter.

    Here's what to do:

    1. After "Get file content" action, add a "Compose" action

      • Input: Use the dynamic content body('Get_file_content')

      • This ensures you're extracting the actual binary content

    2. In "Convert Word Document to PDF"

      • For the File parameter, use the output from the Compose action

      • Don't use the file name or file identifier

    3. Alternative approach (more reliable):

      • Skip "Convert Word Document to PDF" action

      • Use "Create file" action (OneDrive/SharePoint) with these settings:

        • File name: filename.docx

        • File content: Output from "Get file content"

      • Then use OneDrive's "Convert file" action to convert to PDF

    If still failing, try this workaround:

    Create a two-step process:

    • Action 1: "Create a Microsoft Word document with the given content" (as shown in the second reply)

    • Action 2: Use that newly created Word file's content for conversion

    The HTML table approach in the second reply works because you're creating a fresh Word document instead of passing through existing file content.

    Root cause: Your flow is passing file metadata or a file reference instead of actual binary content. The Compose action forces evaluation of the file content before passing to the converter.

    Test with a simple static Word file first to isolate whether the issue is with file retrieval or conversion.

    Thank you! 
    Did I answer your question? Mark my post as a solution!
    Proud to be a Super User!

  • WarrenBelz Profile Picture
    155,291 Most Valuable Professional on at
    What @MParikh is suggesting is exactly what I do - create a temporary .docx file in OneDrive and then convert that. Assuming that the output of your Word creation action is valid, it will work. If not, you need to go back a step and check that the temporary .docx file can be opened.
  • CU31101829-0 Profile Picture
    30 on at
    @MParikh I tried this, using a compose as you mentioned: -
     
     
     
     
    and i pass the outputs of the compose to the convert word Document to PDF, but still the same issue.
  • CU31101829-0 Profile Picture
    30 on at
    @WarrenBelz and how do you pass the html to the document content ?
  • WarrenBelz Profile Picture
    155,291 Most Valuable Professional on at
    I use a Template, however several of these have HTML content in merge fields.
     
    I did however test the Word element you are using in the Flow and it produces a valid Word document in the user's OneDrive, however it does not seem to want to convert the content to PDF using either the Word or OneDrive converters. It also does not want to (as I do) create a file in OneDrive using the content.
     
    If you cannot solve this doing it your way, I suggest you use a Template with one merge field and insert the HTML into there, then use what I do - that will definitely work.
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog 
    Practical Power Apps    LinkedIn 
     
     
  • WarrenBelz Profile Picture
    155,291 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 957

#2
Valantis Profile Picture

Valantis 847

#3
Haque Profile Picture

Haque 609

Last 30 days Overall leaderboard