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
39 REPLIES 39

Vivekb,

Thank you for your help, I cannot beleive I was so close, and could not figure it out. Do you know if this will work with the Camera function and signature as well. Meaning if I were to do one as MyCamera.Photo and one as Signature.Image or would it have to be modified as two seperate tasks, since they are different formats.

 

Thanks you again, at least I can mark one project as complete.... 🙂

TK

It would definitely work.

Let me know if you have any issues with that.


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.

Worked wonderfully! Thank you for your help once again!

 

ViveKB, I am curious. Immediately after launching this tool and sharing their were requests for spin offs. Instead of only being able to attach the signature's and the capture from MyCamera1, is there a way to pick up the jpg's from the Mypix collection? This way you could snap photos, delete ones you did not want, and email out what remained in Mypix. This would definitely require clearing the Mypix collection each time the Camera was selected in order to keep from piling up photos. Any Suggestions would be greatly appreciated.

Thanks, TK

I like this request. 🙂 Right now I am working on my intro to collections video but this seems like a great follow-up. Emailing a random number of attachments is not something I have done yet so figuring out the logic will be fun. 🙂 

 

Hopefully you guys work it out before I do so I can steal borrow your ideas. 🙂 In the meantime back to collections 101 video for me. I am adding a camera input to pave the way. 🙂

 

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

Agreed, at present I  am utilizing the following and it works well for single application.

 

Office365.SendEmail("Blank@Blank.com","Inventory Receipt "& POorJob,"Recipient "& Name.Text& "Email " & EmailAddress & "Date of Receipt "&TodaysDate& " Pallet Count "& 'Pallet Count'& " Box Count " &Boxes& " Condition of Shipment "&'Material Condition',{Attachments:Table({Name:"Photo1.jpg",ContentBytes:MyCamera1.Photo,'@odata.type':""},{Name:"peninput.jpg",ContentBytes:Signature.Image,'@odata.type':""})})

 

Have you watched any Vidoes from Paul O'Flaherty, he has several on PowerApps - Flow connection and SQL links. May help and has some neat camera features.

 

I will keep you posted as things progress... 🙂

Shane,

 

Agreed, it will be interesting to see the next steps as things evolve. I have been watching some video's by Paul O'Flaherty.

They may be right up your alley for video and multiple photos. He utilizes Sharepoint through Flow and direct entry to SQL. May be worth checking out, several useful camera tools in his video. 

I will keep you posted as things progress. 

I replied directly following your message but it appears to have been blocked or errored because I do not see it.

 

Thanks,

TK

@TKSequoyah & @Shanescows

 

I think I got what you were asking for -

 

I ran it just for a collection of photos being capture by the camera control and stored in a MyPix Collection

 

I set the camera control's OnSelect property to -

 

UpdateContext({N:N+1});Collect(MyPix,{Name:"Picture"&N&".jpg",ContentBytes:Camera1.Photo,'@odata.type':""})

I initially set a variabe N - Set(N,0) in the OnVisible property of the screen just to differentiate the photo filenames.

 

Then I clicked some sample phtos that got saved in the MyPix collection -

2018-02-07 11_47_08-PowerApps.png

 

And then I set the Send/Submit button's OnSelect property to -

Office365.SendEmail("youremail@gmail.com","Subject" , "Body Text",{Attachments:MyPix})

And Voila! it worked.

 

So, basically, instead of creating the table in the sendemail statement , I created a collection that has the same column names - Name, ContentBytes and '@odata.type'

 

Hope this helps! Let me know if you have any questions.

 


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.

Also, regarding selecting images to send from the collection -

 

You can display the MyPix in a gallery and insert a checkbox control to select iamges -

 

2018-02-07 12_11_42-PowerApps.png

 

And set the button's OnSelect Property to

ForAll(Filter(Gallery.AllItems,Checkbox1.Value=true),Collect(MyPix2,{Name:Name,ContentBytes:ContentBytes,'@odata.type':'@odata.type'}));Office365.SendEmail("youremail@gmail.com","Subject" , "Body Text",{Attachments:MyPix2})

-

So I created another collection which stores the checkbox value=true images only. You could definitely optimize this the way you want.

 


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.

ViveKB,

 

I am attempting this now and will let you know shortly. I truly appreciate your help! I tinkered for hours and it seemed all combinations ended in error.

I will follow up shortly! 🙂

 

Thanks,

TK

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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