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 to PDF Not Wor...
Power Automate
Answered

Convert to PDF Not Working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey everyone! I've read a few posts about this and it seems like this action works for some and not others. I'm building a very simple flow and the Convert File continues to fail no matter what changes/modifications I make to my flow. If anyone has an idea of something else to try or why this would not be working please respond.

 

High level details:

Trigger: When a File is created or modified (properties only)

Condition: Title contains 'Delinquent'

If Yes > Get File Properties > Get File Content > Create File in One Drive > Convert File // It succeeds up until this step

 

Convert I.PNG

 

Error Details

Status Code 400 (although I've gotten other kinds of failure codes at this point before)

{
"status": 400,
"message": "Error from Office Service. Url=https://wordcs.osi.office365.us:973/wordca/wordconversionservice.svc/rest/ConvertFileUrl HttpCode=OK cert=subject:E=wwdcsse@microsoft.com, CN=OneDriveToWord-USGov, OU=Office Service Infrastructure, O=Microsoft Corporation, L=Redmond, S=Washington, C=US;thumbprint:57BB4D0C21258BFB985BCAE1D5BBF6AD3281C737 ResponseHeaders=ResponseCode: Failure\r\nErrorCode: WordCantOpenDocument\r\nIsExpectedFailure: True\r\nErrorCategory: BadRequest\r\nServiceID: 20f525d2-d59a-4a55-b7ca-d1202f2518ca\r\nOutputFormat: PDF\r\nServiceRegion: UsGovEast\r\nConversionTime: 515.5574\r\nSourceFileDownloadTimeInMs: 468.7926\r\nDate: Mon, 27 Jan 2020 14:45:13 GMT\r\nServer: Microsoft-IIS/8.5\r\nX-Powered-By: ASP.NET\r\n",
"source": "api.connectorp.svc.ms"
}
 
Categories:
  • Verified answer
    JasonK Profile Picture
    177 on at

    The error is stating that it cannot open the word document. Are you sure the file is good and not corrupt? I would also check the file creation at the onedrive step. It needs to have the correct extension .docx etc...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You're totally right, I assumed it was okay based on the check mark and the fact that I saw the doc in OD. I'm following previous instructions and copying over file content and identifiers but I can't open the doc. Do I have to write in .docx or what am I missing in my steps?

  • JasonK Profile Picture
    177 on at

    bdelatorre,

     

    Here is what i have on my onedrive file creation:

    save as docx.JPG

     

    Looks the same to me. Troubleshoot the one drive file creator to see whats going on before moving to the conversion step

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    In your flow, in the create file from onedriev action, you already are using Filename with extension so no need of adding the extension separately and this is what is causing the issue. The resultant will have filename.docx.docx and this is an invalid fileformat which is failing the convert file extension. 

     

    Can you remove the .docx from that action and try again? 

     

    Hope this Helps!

     

    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!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for this - unfortunately it still failed and won't open in OneDrive. Are there OneDrive settings or something I am missing, it is a very small word doc with almost no content (literally 1 page with less then 200 characters).

     

    Any other ideas? Thanks everyone for the feedback, greatly appreciated. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Got it to work! Thanks everyone!

  • JasonK Profile Picture
    177 on at

     Was there anything specific causing the issue?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Originally I was grabbing an attachment from Notes in D365 CE, adding that to SP and then kicking off this whole process to convert. I was able to get the doc into SP (by forcing an expression to grab the base64 document) and it would open successfully - somewhere along the line that broke because it wasn't opening in SP as it used to so once I resolved that I could run the whole thing together.

     

    I just ran it this morning successfully multiple times but now I'm getting a 502 badgateway error which is apparently really common and not possible to fix on my end.

     

     

  • JasonK Profile Picture
    177 on at

    Thanks for the info.

     

    Please post the error message on 502. I have been battling this for a week with the pdf converter. Issues from service connector failure to operation timeout.

  • JasonK Profile Picture
    177 on at

    Tested it just now and still failing:

     

    bad gateway timeout.JPG

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
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard