Static HTML to PDF Power Automate BadGateway

Community Beginner ,
May 25, 2022 May 25, 2022

Copy link to clipboard

Copied

Hello all!

 

I've constructed a Flow that takes fields from a form in PowerApps including a signature and places them within a HTML Template with inline CSS. The flow then creates a folder on sharepoint, uses the HTML to generate an index.html file within that folder and convert the folder to a ZIP file as requisite for Adobe to convert the HTML to a PDF but I keep getting a 502 BadGateway error.

 

I have tried:

  • Copying and pasting the action from a PowerAutomate Template
  • Recreating the flow from scratch
  • Re-authenticating with Adobe Services
  • Running the content with both the application/x-zip-compressed and application/zip MIME types
  • Embedding the signature as bas64 and saving the image to sharepoint so that it goes into the generated ZIP file.
  • Running the HTML file with no dynamic content
  • Saving the generated HTML and images, Zipping it manually, putting that file onto Sharepoint and running it manually with no dynamic content at all going into the Adobe connector.

 

Still the same result every time! It's been a couple of days now so I would hope it wouldn't just be bad timing??

 

Any input greatly appreciated 🙂 !

Views

190

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 25, 2022 May 25, 2022

Copy link to clipboard

Copied

Can you confirm that the folder that you turn into a zip has the index.html on the root of the zip file? Or does it zip into a folder inside the zip?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 25, 2022 May 25, 2022

Copy link to clipboard

Copied

Thanks for the quick reply Ben! Index.html is definitely in the root of the zip file.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 29, 2022 May 29, 2022

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 29, 2022 May 29, 2022

Copy link to clipboard

Copied

Hello Ben, is there a way I could perhaps send you a test ZIP file?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

For anyone interested who finds this, the Adobe connector just doesn't seem to like ZIP files generated by the Sharepoint API as outlined in this guide here: https://www.tachytelic.net/2021/07/power-automate-create-zip-file/

 

Added removed the files from the example ZIP File in the Adobe Github and put the same HTML content into it and it generated perfectly. Ended up going with a third party solution.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

Just *removed and *the PDF generated sorry.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2022 Jun 28, 2022

Copy link to clipboard

Copied

Hi @himactim ,

We are noticing exactly the same problem using the Adobe PDF connector in Power Automate.

Was there a work around that you managed to arrive on? Or did you forgo the Adobe connector for a competing product?

 

The problem is evident when we are using the SharePoint API to generate a ZIP of a folder (as per the same blog post you referenced).  We also manually clicked the Download button in the folder to manually download the ZIP from the SharePoint UI (thinking maybe it was some parameters in that API call to SharePoint to generate a ZIP) and found that feeding this ZIP to the Adobe connector also failed.

 

Unfortunately it seems that there is something in the metadata of the ZIP that is causing the Adobe API Services to reject any ZIP produced by SharePoint.  

 

In path of assembling Power Automate logic, it would make sense for a user to want to leverage SharePoint to generate a ZIP that is provided to the Adobe connector.  We are constructing the HTML file and storing it in a SharePoint folder alongside other assets (images) that we want to incorporate into the final outcome.  That would have to be a primary use case for the HTML to PDF action in the Adobe PDF Connector.  Otherwise there aren't other options and manually asking a user to create a ZIP defeats the purpose of automation!

 

It would be great if this could be recognised by Adobe as either a bug or high-priority enhancement.

 

Anecdotally in the Power Platform community we came across three other folks that mentioned that they had to forgo investment in the Adobe connector due to this exact issue.  Unfortunately, we have had to do the same with two customers in the last 3 months for this exact reason also.  I would encourage those who arrive here via googling their symptoms with the connector to reply and provide your feedback so that this can be prioritised by Adobe's product team.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 28, 2022 Jun 28, 2022

Copy link to clipboard

Copied

Hello Matt, I didn't end up finding a solution unfortunately. I came to the same conclusion that it is something in the metadata, but couldn't come up with a feasable way to change it within a flow. Opening the example archive that Adobe provides on their Github in 7-Zip we can see that the compressed files within have a specific atrribute set that differs slightly from those applied in an archive generated by the Sharepoint API which could be the cause but even if that is true again, there's no simple way to change that in a Flow. 

 

Long story short, we ended up going with Encodian which doesn't need the ZIP to begin with and works flawlessly.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 04, 2022 Jul 04, 2022

Copy link to clipboard

Copied

LATEST

Hi @himactim ,

Thanks for choosing Encodian for your solution! If you need anything we're just an email away 🙂 hello@encodian.com

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources