cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roncam
Helper II
Helper II

send a camera photos collection with email

a while ago I built an application that send a collection using powerapps by email. The below was working:

 

 

Collect(Photos,{Name:"Photo"&X&".jpg",ContentBytes:Camera3.Photo,'@odata.type':""});Set(X,X+1)

 

Office365.SendEmail(Emailaddress.Text,"Device Report",HtmlText1.HtmlText,{Attachments:Photos,IsHtml:true});Navigate(SuccessMsg,ScreenTransition.Fade);Navigate(SuccessMsg,Fade)

 

now im getting the below error:

icompatible type. The 'ContentBytes' column in the data source you're updating expects a 'Blob' type and you're using a 'Image' type.

 

can you help me ?

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @roncam ,

Shane Young @Shanescows has made a very good video on this subject.

Maybe a revisit of his methodology can be of assistance.

 

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.

thanks for your reply. unfortunately the error im getting above is coming after i followed shane video.

Hi @roncam ,

Below is the syntax from a screenshot of Shane's video and yours 

ShaneCollect.png

Collect(
   Photos,
   {
      Name: "Photo"&X&".jpg",
      ContentBytes:Camera3.Photo,
     '@odata.type':""}
);
Set(X,X+1)

Maybe put the variable set at the start, so it has a value for the first pass (but you are probably getting Photo0.jpg).

The second part

ShaneAttach.png

Office365.SendEmail(
   Emailaddress.Text,
   "Device Report",
   HtmlText1.HtmlText, 
   {
      Attachments:Photos,
      IsHtml:true
   }
)

appears to be exactly as per the specs - maybe get rid of the IsHtml - I have never used it and HTML renders perfectly. It is worth a try anyway to see if the specs work without it.

 

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.

 

 

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,818)