cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drvela
Frequent Visitor

Office365.SendEmail with Attachment Error

Hi there, I'm trying to send an email with an attachment that is a csv file of a collection created within the app. I consistently get the same error when I try to use the Concat function to place my collection's data in the attachment's ContentBytes. I've tried the process using Flow and receive the same error. Is anyone familiar with this? Office365.SendEmail failed: One or more errors occurred. Reporting the first one: Bad Request <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> Bad Request - Invalid URL HTTP Error 400. The request URL is invalid Thanks, Darian
2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @drvela,

 

Can you please share the detailed related formulas here?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mona,

 

Sorry for the late response. Here is the formula, where SelectedTraining is a collection in the app and CcUser is the current user's email address. 

 

 

Office365.SendEmail("Darian.Vela@ecolab.com", "Subject", "Body", {IsHtml: true,  Importance: Normal, Cc:CcUser, Attachments:Table({Name:"test.csv", ContentBytes:Concat(SelectedTraining, it0l & ", "), '@odata.type':""})})

 

Thanks,
Darian

 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (49,266)