cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shanescows
Super User
Super User

Send an image from pen input via email

I want to have a simple wavier form. Type your name, type your email, and then sign your name with the pen to give your consent. I can make the form. I can send an email. What I cannot figure out how to do is to send the image file. If I send the PenInput1.Image I get a blob link. 😞 

 

I have seen crazy ways to get that output out via Flows and APIs but surely I am missing a more straightforward solution with PowerApps? Save the input to a local file and then email that local file as an attachment.

 

Suggestions?

 

Thanks

 


Shane @Shanescows

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Shanescows,

 

Try this - 

Office365.SendEmail(TextInput1.Text,"Test Pen input","Test",{Attachments:Table({Name:"peninput.jpg", ContentBytes:PenInput1.Image, '@odata.type':""})})

For more details about the outlook connector, check this out - https://docs.microsoft.com/en-us/powerapps/connections/connection-office365-outlook 

 

Hope this helps!


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

39 REPLIES 39

Hi @Shanescows,

 

Try this - 

Office365.SendEmail(TextInput1.Text,"Test Pen input","Test",{Attachments:Table({Name:"peninput.jpg", ContentBytes:PenInput1.Image, '@odata.type':""})})

For more details about the outlook connector, check this out - https://docs.microsoft.com/en-us/powerapps/connections/connection-office365-outlook 

 

Hope this helps!


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you for this. That was what I was looking for. Of course, it comes through a little funny because my browser is silly so I had to update it to what I ran. 🙂 

 

Office365.SendEmail("shane.young@boldzebras.com","Subject" , "Body Text",{Attachments:Table({Name:"peninput.jpg",ContentBytes:PenInput1.Image , '@odata.type':""})})

I will probably turn this quick form I used this with into a video. If I do happy to give you a shoutout if you want one? What name/location should I use for you?

 

Thanks again,

 

 

Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Glad that it worked.

Vivek Bavishi (feel free to pronounce it however you want 🙂 )from Florence, Kentucky

Thanks in advance for the shoutout!


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I promise to mess it up very badly. 🙂 

 

And you are from Florence. That is awesome. I grew up in Union and live up by Kings Island now. Small world. 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Oh cool!

 

Maybe we should start a Cincinnati PowerApps meetup Smiley Happy


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @ThatAPIGuy this is the video I give you the shoutout for your help. PowerApps Consent Form and sending pen input as an attachment

 

And this is the follow-up video. 

Conditional Formatting and popups with PowerApps

 

Thanks again for your  help

 


Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Appreciate it!  

 

Great job on the video!

 

And regarding the pronunciation, not too bad Smiley Tongue 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This worked really well, was able to get the single signature to work time and time again. However, is there a way to add multiple attachments? I have tried for several hours and cannot seem to figure it out. I would like to add two signature inputs in order to allow for joint consent rather than submitting multiple forms for say a couple to consent.

@TKSequoyah

 

Yes, you can do it by using this code

Office365.SendEmail("youremail@gmail.com","Subject" , "Body Text",{Attachments:Table({Name:"peninput.jpg",ContentBytes: PenInput1.Image , '@odata.type':""},{Name:"peninput2.jpg",ContentBytes: PenInput2.Image , '@odata.type':""})})


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,457)