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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

HTML to PDF file

(0) ShareShare
ReportReport
Posted on by 372

Hello!

 

I have this flow:

firda59_0-1686035405516.png

See, there are 5 items that should appear in 1 PDF file. However, in reality, there are 5 files with different items sent to the email.

firda59_1-1686035588433.png


How to solve this problem? Thank you!

Categories:
  • v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @firda59 ,

     

    If you want generate one single PDF with all you needed HTMLs and send only one email, you should initialize a variable to store HTMLs in "Apply to each" loop. Then convert it to PDF and send an email outside of the loop.

     

    vwenjuanmsft_0-1686036045318.png

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • firda59 Profile Picture
    372 on at

    Hi @v-wenjuan-msft 

     

    I don't understand using initialize variable like that, can you help me, what should I write in name column.

    firda59_0-1686036884982.png

     

    Then, in Encodian I have HTML text for table format. When I insert my HTML to encodian, like this

    firda59_1-1686037186986.png

    automatically encodian will be appear in Apply to Each, because I arrange the value from get Items (sharepoint) to the table format (HTML text) like this,

    firda59_2-1686037331925.png


    How to make the encodian in the outside loop? Thank you.

  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @firda59 ,

     

    With reference to your new reply, here's details and modifications to my previous reply:

    vwenjuanmsft_0-1686540335456.png

     

    vwenjuanmsft_2-1686540559488.png

     

    In initialization, we will build opening part of HTML table. In apply to each, we will append rows of records to the HTML table with dynamic content. and then outside of the apply to each, we will append closing lines to the HTML table. So that all your data from "Get items" will be integrate into one HTML table storing in the variable. Next you can insert the variable into "Convert HTML to PDF" and continue.

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard