
Announcements
Hi I'm trying to send photos that I have in a collection "CameraPics" and I also want to send the PenInput as an image as attachments?
I thought I could use {attachments: CameraPics & Table({Name:"Signature.jpg",ContentBytes:Signature.Image, '@odata.type':""})}
But it doesn't like this, so I'm trying to understand if there is a way to achieve this?
Hi @Ashers82 ,
Could you please share a bit more about your CameraPics collection?
Does your CameraPics collection have the following data structure?
If you want to send an email with the CameraPics collection as attachments, your CameraPics collection must be above data structure.
If your CameraPics collection has above data structure already, you could consider merge your CameraPics collection and the PenInput image data into single one Collection, then send the merged collection as the attachments of the meail.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Collect" button to following:
Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: AddMediaButton1.Media, '@odata.type':""})
On your side, you may type:
Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: Camera1.Photo, '@odata.type':""})
Set the OnSelect property of the "Send Email" button to following:
Office365.SendEmailV2(
"Test1@Wicren.onmicrosoft.com",
"PowerApps Test",
"PowerApps Test",
{
Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: PenInput1.Image,'@odata.type':""})
}
)
On your side, you should type:
Office365.SendEmailV2(
"Your Email Address",
"Subject Text",
"Body Test",
{
Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: Signature.Image,'@odata.type':""})
}
)
Note: Please make sure your CameraPics collection has the data structure as the first screenshot I preovided above.
Please take a try with above solution, then check if the issue is solved.
Best regards,