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
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!

secondImage

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)