Send selected attachments on an email directly from Power Apps

Have you ever wanted to send only some of the attachments on your record via email to someone? The solution is actually quite straightforward, but requires a bit of trickery not evident in the picture below.

The attachment control is a standard item in a form displaying the attachments on a record (I called this one acEmail ) – there are no modifications to it. The check boxes shown however are in a gallery placed “on top” of the attachment control – I called it galAttach here.
You may have to adjust the TemplateHeight to get it to “line up” properly with the attachment control. 

The Items of this gallery are


essentially a copy of the data in the attachment control.

Two labels are then inserted into the gallery with ThisItem.Name and ThisItem.Value and then hidden. A checkbox is then inserted (I called mine ckChoose) – it does not need to bound to anything.

Now the email button uses the Office365Outlook Connector (so attach it in your data sources) with the following OnSelect

   "Subject here",
   "Attached are the chosen files",

and it picks the values from the gallery (which has the same values as the attachment control), and attaches the content to the email.

Leave a Reply

Your email address will not be published. Required fields are marked *