web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Convert html to PDF: An exception occurred while executing within the Sandbox

(0) ShareShare
ReportReport
Posted on by 99

Convert HTML to PDF: An exception occurred while executing within the Sandbox

 

we are running a flow from a PowerApp that works for all our team members (12) except for one.

The flow gets items from a SharePoint list filtered by user and date range (from the app), creates a table, gets images from attachments, adds these, creates PDF (expense report).

 

Works perfect for everyone (sometimes having to break down the date range to stay within the 2MB limit - I know) except for one user, where it does create the HTML file, but always fails on converting to PDF with the somewhat obscure message:

"An exception occurred while executing within the Sandbox".

It does create the HTML files. But does not convert.

 

I did try to re-save the flow and enter it new into the App (that solved another connection issue before) - but still the same error.

Any idea anyone? The flow DOES work. Except for one user (same license as all others).

 

Thank you in advance!

I have the same question (0)
  • bgya2 Profile Picture
    4 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    Hi KayFax,

     

    Thanks for posting, I'm having the same issue. I'm testing my flow from a mobile phone (Pixel 4a using Chrome and Edge) and I'm getting the same message. It's working fine with the same inputs from my laptop. As with your case, my html files are creating fine for both failed and successful flows, it just fails when converting from html to pdf. Testing the same operation (same file upload) from a different phone has run successfully. I'm not sure where to go from here.

     

    Context: I'm triggering from a Forms submission with an image upload, creating a new item onto a SharePoint list and attaching the upload. I'm then creating an html file in OneDrive to pull the information into one document, and then saving the PDF back to SharePoint.

     

    Additionally, it could be worth noting that I'm very new to Power Automate.

  • Community Power Platform Member Profile Picture
    on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    My flow was working perfectly until last week when it randomly started throwing the same error. I am creating an HTML file and then converting to PDF as well. HTML file creation works but PDF conversion throws this error. Really need some guidance here. 

  • Minie Profile Picture
    3 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    I am having the same issue only for one user.
    Does somebody has an explanation for this problem?

    Thanks

  • a-jesschen Profile Picture
    Microsoft Employee on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    I am having the same issue just weeks ago, not sure if it is because the Power Automate have upgrade anything, let me raise a ticket from the backend and see if anyone can fix it...

  • tgraham Profile Picture
    73 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    i had the same problem until i realized that I forgot to set pagination. the flow stopped at 256 even though I had about 700 items to process. resubmitted with correct pagination and it worked.

  • KayFax Profile Picture
    99 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    That's a good point, but I had already checked that - anyway, the list contains a max of 50-100 items - part of the flow is after the successful creation of PDF to move the processed list items to another one - but for that one user, where it does not work, obviously they remain in the "unprocessed" list...  also still weird because only one user has that problem. All others work fine. I am waiting now on the outcome of the ticket that @a-jesschen is raising:-)

  • KayFax Profile Picture
    99 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    weird, right? I am already glad I am not the only one having this issue...

  • Community Power Platform Member Profile Picture
    on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    Hey, we have the same issues, we use the flow to convert from HTML to PDF and random is working and others not. I do a lot of tests and it seems to be space limit problem? In our HTML we add some pictures, when I add 3 or less is working but if I add more fails with this error. But this was working few weeks ago.

  • CraigLee23 Profile Picture
    22 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    I was actively testing this flow and it just stopped working on April 8th - like right out of the blue.

     

    I went back to it today to do some more tests and I get the same error over and over again.  The service has to be down or something???

  • KayFax Profile Picture
    99 on at
    Re: Convert html to PDF: An exception occurred while executing within the Sandbox

    This could be the 2MB limit - the HTML file must not be heavier than the 2MB- limit. So not too many images. But in our case the exact same selection with attachments works for me to create HTML and convert to PDF, but NOT for the one user where it always fails. While it did work last year for all users. It is very weird.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard