cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bdelatorre
Advocate I
Advocate I

Convert to PDF Not Working

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"
}
 
1 ACCEPTED SOLUTION

Accepted Solutions
JasonK
Advocate II
Advocate II

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...

View solution in original post

20 REPLIES 20
JasonK
Advocate II
Advocate II

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...

View solution in original post

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?

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

Hi @bdelatorre 

 

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!

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. 

bdelatorre
Advocate I
Advocate I

Got it to work! Thanks everyone!

 Was there anything specific causing the issue?

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.

 

 

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.

Tested it just now and still failing:

 

bad gateway timeout.JPG

I'm getting the same exact error - I got it to run successfully once and then it continues to fail. Is it tied to Azure, is the connector faulty....? Seems like tons of people have this issue. 

 

It's not allowing me to paste my image right now but it is the same exact message.

I would suggest opening a ticket. I have been pushing for over a week for them to do something. They continue to push back having me rebuild, submit network traces and all those useless tasks. The issue is on their end and they wont escalate to the proper channels.

 

Can we get some microsoft help here?

@JasonK  try using the Convert PDF with Path instead of the regular one. I've been getting consistent success with it. Let me know if that helps!

Thanks for this suggestion. I will try this as my next step

@bdelatorre When using convert with path, what are you putting into the path? I tried using the onedrive location path but would not let me specify the folder. I tried with just the ID of the file and it was giving resource not found.

 

Can you please post a screenie of how you are structuring the path field?

 

P.s. i received another office svc failure again today on the connector

 

*Update - nevermind, i was able to choose path instead of ID in the path field. Unfortunately it ran successful once then started failing again with Bad Gateway - 

"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: WordFileDownloadFailed\r\nIsExpectedFailure: True\r\nErrorCategory: BadRequest\r\nServiceID: 1874c925-9285-4734-b051-b9c0e9984957\r\nOutputFormat: \r\nServiceRegion: UsGovSouthWest\r\nDate: Fri, 31 Jan 2020 00:58:32 GMT\r\nServer: Microsoft-IIS/8.5\r\nX-Powered-By: ASP.NET\r\n",

 

Thanks

Hi @JasonK, Do we have a working solution on this ? Thanks 🙂

Hi Aditya,

 

Basically need to analyze the error and create a ticket for Microsoft, or determine further. There are a few reasons why this error occurs, and the common one i have experienced relates to Microsoft API/connections/converter failing, which require action on their part to fix.

Augeas
New Member

Hi, I have been using convert docx to pdf for months with no problem but somehow this morning it none of the flow is run successfully.

 

this is the error message: There was an error accessing the file. Please try again or select a different file.
clientRequestId: 9c43f2e7-558f-42bd-b9c5-efc152acb6f9

 

Please help, how to fix this problem? Because it was working fine but now it's not. is there any way around this?Screen Shot 2020-06-22 at 12.27.16 pm.png

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (46,664)