cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EthanWang
Helper I
Helper I

Email selected attachments from SharePoint library files by powerapps

Hello All,

Here is the scenario -- I stored PDF files in share point library named by specific name.  For my users, they can view the selected PDF file(using flow) in PA and then request emailing this file to them.

 

Here my problem is the last step -- How to email the selected file to the user with PA?

 

Any advise...

 

Many thanks,
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @EthanWang ,

One of mine is below - firstly the Flow. The second action is SharePoint Get file content

PDFEmail.png

then the Run Parameters - the Items of the Gallery is simply the SharePoint Library (filtered as needed) and I have an Email icon in the gallery.

EmailPDF.Run(
    stSite,                 //The SharePoint Site address
    ThisItem.Identifier,    //The Identifier from the Library data (standard field)
    User().Email,           //User's email addesss
    "Attached file - " & ThisItem.DocName,       //DocName is a field populated when doc filed
    "Attached is the " & ThisItem.DocName & " as requested",
    ThisItem.Name           //The name that goes on the email attachment
);
Notify(
    "A copy of " & ThisItem.DocName & " has been emailed to " & User().Email & " - check your inbox",
    NotificationType.Success
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @EthanWang ,

One of mine is below - firstly the Flow. The second action is SharePoint Get file content

PDFEmail.png

then the Run Parameters - the Items of the Gallery is simply the SharePoint Library (filtered as needed) and I have an Email icon in the gallery.

EmailPDF.Run(
    stSite,                 //The SharePoint Site address
    ThisItem.Identifier,    //The Identifier from the Library data (standard field)
    User().Email,           //User's email addesss
    "Attached file - " & ThisItem.DocName,       //DocName is a field populated when doc filed
    "Attached is the " & ThisItem.DocName & " as requested",
    ThisItem.Name           //The name that goes on the email attachment
);
Notify(
    "A copy of " & ThisItem.DocName & " has been emailed to " & User().Email & " - check your inbox",
    NotificationType.Success
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz 

Much thanks for your suggestion, it works nicely.

 

But now i have another question is if i want to email multiple attachments from SP library which i collected in powerapps, how to put all these attachments into emails?

 

Thanks

 

Hi @EthanWang ,

You need to repeat the process for each file and add as separate attachments.

Hi @WarrenBelz 

Cant i combine all the attachments into an array than use flow to attach the array as an attachment?

Hi @EthanWang ,

If you are coming from an Image collection or attachments, the two videos from Shane Young will guide you on this.

However you are getting files from a Library and need to construct these as an array and then get the Outlook connector to accept them. It is not something I have attempted (though lack of need). I have up to three attachments on a number of apps and simply grab and attach them singly.

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,837)