I’m working on a Power Automate flow that converts data collected from Microsoft Forms into an HTML file, which I then convert into a PDF using Ecodian. Currently, the flow successfully sends the generated PDF via email.
However, I now need to push this PDF file into HubSpot as part of a new requirement. While I was able to successfully push the file as an HTML document into HubSpot, I’m encountering an error (as shown in the screenshot below) when trying to upload the PDF version. I’m seeking guidance on why the PDF fails to load in HubSpot and how to resolve this issue.
Any help or insights would be appreciated!
The file successfully pushes to HubSpot but clicking to view the pdf, I get the below error:
Copy of the current code:
URL: https://api.hubapi.com/files/v3/files
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Body:
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=“file”; filename=“OnboardingForm.pdf”
Content-Type: application/pdf
@{outputs(‘Compose_PDF_Content’)}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=“folderId”
176084124214
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=“options”
Content-Type: application/json
{“access”: “PUBLIC_INDEXABLE”}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
*** This is what is in the
@{outputs(‘Compose_PDF_Content’)} variable***
This is a screenshot of the power automate flow:


