Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Attach a Signature and Attachments collection in one email

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

This is my first attempt at a powerapps and i'm amazed i've done as much as I have so far, there's one thing I can't seem to get to work. I'm trying to email the signature and the attachments that are uploaded on the powerapp. I've added the below code but it only sends through the signature and not the attachments. Can you tell me where i'm going wrong please? 

 

Office365Outlook.SendEmailV2("firstname.lastname@mydomainname.com", "Subject Here", "Body Here",{Attachments: AddColumns( RenameColumns (AttachmentControl.Attachments,"Value", "ContentBytes"), "@odata.type", "")};
{Attachments:Table({Name:"Drawings.jpg", ContentBytes:Signature.Image , '@odata.type':""})});Reset(AttachmentControl);Reset(Signature)

 

Thanks in advance! 

  • WarrenBelz Profile Picture
    WarrenBelz 145,495 on at
    Re: Attach a Signature and Attachments collection in one email

    Hi @DublinOH_User ,

    You need two attachment controls - one for each purpose.

  • DublinOH_User Profile Picture
    DublinOH_User 150 on at
    Re: Attach a Signature and Attachments collection in one email

    When I try this approach the attachment property in the email formula  - states there are mixed content types. Meaning the column with the image blog in the collection (ContentBytes:)  cannot accept different file types.
    So the image in the email body formats fine - but I cannot seem to be able to add additional regular attachments (pdf, excel, etc.)

    Any ideas???

  • Dave-ITMan Profile Picture
    Dave-ITMan on at
    Re: Attach a Signature and Attachments collection in one email

    Thank you for your help with this, I can confirm that this has worked. Much appreciated and apologies in the delayed response. 

  • WarrenBelz Profile Picture
    WarrenBelz 145,495 on at
    Re: Attach a Signature and Attachments collection in one email

    Hi @Dave-ITMan ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,495 on at
    Re: Attach a Signature and Attachments collection in one email

    Hi @Dave-ITMan ,

    Try the below

    ClearCollect(
     colImages,
     AddColumns(
     RenameColumns(
     AttachmentControl.Attachments,
     "Value",
     "ContentBytes"
     ),
     "@odata.type",
     ""
     ),
     {
     Name: "Drawings.jpg",
     ContentBytes: Signature.Image
     }
    );
    Office365Outlook.SendEmailV2(
     "firstname.lastname@mydomainname.com", 
     "Subject Here", 
     "Body Here",
     {Attachments: colImages}
    );
    Reset(AttachmentControl);
    Reset(Signature)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • Dave-ITMan Profile Picture
    Dave-ITMan on at
    Re: Attach a Signature and Attachments collection in one email

    Hi @Nogueira1306 

     

    Thank you for the quick reply. I'm trying to avoid using flow if it's possible as I prefer to just troubleshoot via one system if that makes sense. I can't imagine it would be difficult to do via code, as i'm halfway there, it's just the final stage that's really frustrating.

  • Nogueira1306 Profile Picture
    Nogueira1306 7,390 on at
    Re: Attach a Signature and Attachments collection in one email

    My suggestion is for you to use the Flow to send the email.. It might be easier.

    Here you have a flow that uses the signature in a PDF

     

    https://www.youtube.com/watch?v=EACk5jlQ_jU

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard