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 Platform Community / Forums / Power Apps / send dynamic pdf to d...
Power Apps
Answered

send dynamic pdf to different emails

(0) ShareShare
ReportReport
Posted on by 139
Very good afternoon to the entire community. I need to send emails to several emails attaching a pdf.
Email addresses and other data that is dynamic are obtained from a gallery:
I am trying to send an email to each address and yes it is possible but I have problems with the PDF since it does not change the data. Any ideas or suggestions?
This is my code:
Set(varPDF333;PDF(PDFFRPVE;{ExpandContainers: true }));;ForAll(Gallery6.AllItems As Gal;Office365Outlook.SendEmailV2(Gal.Label9_4.Text;"Reporte Mensual de Desempeño en SSOMA "&Gal.Label9.Text;"Apreciado gerente de "&Gal.Label9.Text;{Importance:"High";Attachments:Table({ContentBytes:varPDF333;Name:"Flash Report Post Venta "&".pdf"})}))
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at
    What exactly are you wanting to do with the PDF and what is PDFFRPVE ? Your current code will send a PDF of this on each email. Where are you getting the PDF reference from if you want different PDF files  - it is unlikely you can do this as you cannot refer to a control as the target of a PDF dynamically.
    Set(
       varPDF333;
       PDF(
          PDFFRPVE;
          {ExpandContainers: true }
       )
    );;
    ForAll(
       Gallery6.AllItems As Gal;
       Office365Outlook.SendEmailV2(
          Gal.Label9_4.Text;
          "Reporte Mensual de Desempeño en SSOMA " & Gal.Label9.Text;
          "Apreciado gerente de " & Gal.Label9.Text;
          {
             Importance: "High";
             Attachments:
             Table(
                {   
                   ContentBytes: varPDF333;
                   Name: "Flash Report Post Venta.pdf"
                }
             )
          }
       )
    )


  • Daniel20 Profile Picture
    139 on at
    @WarrenBelz​​​​​​​
    Very grateful for the response, check with an HTML table if it would be possible to send dynamically? That is, the data in the table changes for each email sent?
    What I am needing is for each email sent to change the information in the table. Both the email and the information are taken from the same gallery.
     
  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at
    You could use an image control (which can be dynamic) inside whatever the source of the PDF is - just be aware that the experimental PDF function does not handle images well at times - especially URL-based (so this would be better than the HTML option)

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 Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard