It is sort of possible to do this, but with one significant limitation - the image received in the email will be a base64 (I think) encoded string as opposed to a .png, .jpg, etc. So, basically, it won't work with any image viewer, but you could paste the string at http://codebeautify.org/base64-to-image-converter (or somewhere similar) to view the image. This would let you view the image and save it (right click save as). This is far from ideal, though. You may have more flexibility with some of the connectors. Anyway, the steps follow if you want to give it a try:
Add a Pen Input control and rename it MyPenInput.
Create a new Flow (File -> Flow).
The flow should look something like this:
Name the Flow EmailPenImage and make sure you do "Add dynamic content" for the attachment.
Then back in PowerApps, add a button. Select the button and go to "Actions" in the ribbon. Then click "Flows" and select your Flow. The Flow needs one parameter - MyPenInput.Image. The button's OnSelect should now have: EmailPenImage.Run(MyPenInput.Image)
One other thing I tried was sending an HTML email with an image that has its background-image set to the encoded string, but I couldn't get it to work. Basically, instead of having a dynamic attachment, I did a dynamic body and the button had this formula instead: EmailPenImageInBody.Run(Concatenate("<img style='width:", Text(MyPenInput.Width), "px; height:", Text(MyPenInput.Height), "px; background-image: url(""data:image/png;base64,""+Base64.encode(""", MyPenInput.Image, """));'></img>"))
I think it wasn't working because it just sends the ID of the blob, whereas sending it as an attachment probably sends the encoded string the ID corresponds to.
Very interesting. I'm not sure why this would be happening. It seems as though the Flow has an issue with how it was setup or it seems that there is a problem with how it is being used in the button's OnSelect in PowerApps (such as the attachment parameter being empty or incorrect). Can you show a screenshot of what you entered in the fields to setup the Flow (but please block out any personal information such as your email address) and a screenshot of the OnSelect property?
Hopefully we can get to the bottom of this!
I found out there is a much MUCH better way to do this! Apparently, you can save the image to OneDrive and have a Flow that will be triggered when a file is added to the OneDrive and will email the file when this happens.
If I Use this flow, I can see the error Message what i send you in this post. your Idea to Save the image first in One Drive and then, send the image to mail it´s amazing but, How do I save a Image in One Drive? and then, How do I create the Flow?
sorry, but I´m a newbie
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand