Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

send dynamic pdf to different emails

Posted on 1 Dec 2024 22:51:57 by 127
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:
  • WarrenBelz Profile Picture
    WarrenBelz 143,202 on 01 Dec 2024 at 23:05:17
    send dynamic pdf to different emails
    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"
                }
             )
          }
       )
    )


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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,202

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,877

Leaderboard