Showing results for 
Search instead for 
Did you mean: 
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
Community Support
Community Support

Hi @drvela,


Can you please share the detailed related formulas here?




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("", "Subject", "Body", {IsHtml: true,  Importance: Normal, Cc:CcUser, Attachments:Table({Name:"test.csv", ContentBytes:Concat(SelectedTraining, it0l & ", "), '@odata.type':""})})




Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (19,199)