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

Send Attachment from Sharepoint in Email

Hi everyone!

 

I'm working with PowerApps to make a registration app. I am attempting to send a confirmation email once a user has registered with a calendar attachment (.ics file) that was uploaded in a Sharepoint list. But it is giving me the errors seen in the screenshot below. 

Screen Shot 2020-08-21 at 12.12.46 PM.png


I even tried doing the commands seen below, but I still got the same issue.

ClearCollect(FinalAttachments, {Name: Available_Trainings.Selected.Attachments.DisplayName, ContentBytes: Available_Trainings.Selected.Attachments.Value, '@odata.type':""});

Office365Outlook.SendEmailV2("email@site.com", "Test", "Hi", {Attachments: FinalAttachments})


Any ideas what I am doing wrong?


Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @jteddick ,

Do you want to send an email to the specific user along with attachments stored in your SP List?

 

Regarding the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please try the following workaround:

6.JPG

Office365Outlook.SendEmail(
                            "user@email.com", 
                            "Test Email Subject Line", 
                            "Test Email", 
                            {
                                Attachments: ForAll(
                                                    ThisItem.Attachments As LoopRecord,
                                                    {
                                                        Name: LoopRecord.DisplayName,
                                                        ContentBytes: LoopRecord.Value,
                                                        '@odata.type': ""
                                                    }
                                ) 
                            }
)

 

On your side, please modify your formula as below:

Office365Outlook.SendEmailV2(
                             "email@site.com", 
                             "Test", 
                              "Hi", 
                             {
                                Attachments: ForAll(
                                                    Available_Trainings.Selected.Attachments As LoopRecord,
                                                    {
                                                        Name: LoopRecord.DisplayName,
                                                        ContentBytes: LoopRecord.Value,
                                                        '@odata.type': ""
                                                    }
                                              ) 
                             }
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

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

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @jteddick ,

Do you want to send an email to the specific user along with attachments stored in your SP List?

 

Regarding the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please try the following workaround:

6.JPG

Office365Outlook.SendEmail(
                            "user@email.com", 
                            "Test Email Subject Line", 
                            "Test Email", 
                            {
                                Attachments: ForAll(
                                                    ThisItem.Attachments As LoopRecord,
                                                    {
                                                        Name: LoopRecord.DisplayName,
                                                        ContentBytes: LoopRecord.Value,
                                                        '@odata.type': ""
                                                    }
                                ) 
                            }
)

 

On your side, please modify your formula as below:

Office365Outlook.SendEmailV2(
                             "email@site.com", 
                             "Test", 
                              "Hi", 
                             {
                                Attachments: ForAll(
                                                    Available_Trainings.Selected.Attachments As LoopRecord,
                                                    {
                                                        Name: LoopRecord.DisplayName,
                                                        ContentBytes: LoopRecord.Value,
                                                        '@odata.type': ""
                                                    }
                                              ) 
                             }
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

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

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,654)