Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

OneDrive For Business (OD4B) Convert HTML to PDF Fail

Greetings all,


I'm having issues lately with my HTML to PDF conversion process.  I've followed the Chino Does Stuff  method:


The flow run fails during the 6th step of the above, "Convert file using path" in OD4B:  

Error: Action 'Convert_file_using_path' failed
Error Details:  Bad Gateway
Status Code:  502


  "error": {

    "code": 502,

    "source": "",

    "clientRequestId": "64e3de4e-7ec3-4873-af96-5ba8d3e9d874",

    "message": "BadGateway",

    "innerError": {

      "status": 502,

      "message": "Service Unavailable - ....
There doesn't seem to be a rhyme or reason for when/how it fails; some days for some users, there's no issues - other days, it's constantly failing, or the conversion during the 6th step resulting in ~60 second duration times.  This issue has only being happening for the past couple of weeks, never encountered an issue before the first week of March.
I've read through a few threads trying to find ways to remedy this.  I've tried disconnecting from OD4B entirely, rebuilt the flow, then reconnected.  No luck.
I've also read the structure of the HTML may be to blame?   Should I post a sample of the HTML for further commenting?
Thanks very much!
Super User
Super User



Try adding a delay step for a minute or so after creating the file. There might be an invalid response when Convert file using path is trying to find the file. So delaying a minute or so might resolve this. I might be completely wrong here but worth a try.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up

Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,062)