cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KiDy
New Member

Sending email with attachment directly from PowerApp - without the PowerAutomate detour

I have a SharePoint list used as source for a Gallery. One of the fields in the list is a hyperlink to a file located on SharePoint. It has the structure:

https://mycompany.sharepoint.com/:x:/r/teams/SPSite/Folder/Filename.ext

 

In PowerApp I can use Office365Outlook.SendEmailV2(...) to send emails with attachments, and I got it working when using a file select control to select files on my computer and populate a collection. 

 

However, I want to send the file referenced to via the hyperlink, but I cannot figure out how to extract the binary content to put in the ContentBytes field in the collection.

 

Yes, I have seen an old post (more than a year ago) with a similar issue, but it wasn't solved, so I wonder if anyone has figured it out in the meantime...

 

Attachments: AddColumns(ClearCollect(AttachmentToSend,
    { ContentBytes:

        ??????,

        Name: ((Gallery2_1.Selected.Title) & " checklist.docx")
    }
), "@odata.type", "")

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @KiDy :

I am afraid that if you want to get the content of the specified file in the SharePoint library in a canvas app, you can only use the get file content action in the flow.

Best Regards,

Bof

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,547)