web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Multiple Email Attachm...
Power Automate
Answered

Multiple Email Attachments from SharePoint Library files

(0) ShareShare
ReportReport
Posted on by 153,079 Most Valuable Professional

Hi All,

I have a requirement to attach a group of photos (unknown number) stored in a SharePoint Library.

So that this is not started from the beginning, this post on the Power Apps Forum is where I am at the moment, but I have a feeling the answer lies with a Flow.

As noted, I can easily send the URLs/Identifiers to a Flow and well as that of the reference document. I just need the user to select a record and email these.

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi

    So, your Power Apps lists to the user a list of photos currently stored in Sharepoint, user selects the ones he/she needs, and you expect Power Automate (aka Flow) to send the email, right?

    If my assumption is correct, can you share a screenshot of your current Flow design so we can help you to complete it?

    Anyway, you can probably adapt  the Flow described in the following post to your own requirements:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/PowersApps-Flow-Button-to-Send-Email-of-Attachments-from/m-p/277214

    If not, can you detail a bit more your scenario and expectations?

    Thanx!

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Thanks @efialttes ,

    Below (I cannot see your attachment control) is a copy of a similar concept I do when I have two specific files (signatures) where I know the names and locations and embed these in a PDF (also sent in the Flow) and email it. The bit I am missing using a similar concept is how I pass all the file path/names or identifiers from a collection in SharePoint, grab all the files (including the covering letter) and attach then to an email. I read the post you refer to a number of times, but cannot see that part of the detail.

    To answer your first question, the user has a record from a SharePoint list (where the data for the covering letter comes from). The SharePoint Library photos have the ID of this record in a reference field and it is easy to make a collection of these. When the email button is pressed, I just need the lot to go out together. There are no size issues as the photos are small.

    OwnerFlow.png

     

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    First of all, thank you for the detailed post. It makes things easier.

    Please also note the attachment control in my example is for the purpose of attaching several files, not just one

    I think you do not ned to  pass all the file path/names or identifiers, your current design allows an (imo) easier approach to your current challenge: just make your Power App pass the ID of your record to execute your Power Automate Flow.

    THen you can implement a 'Get item' using the record ID to get the data for the covering letter

    Then you can implement a 'Get files (properties only)' and use record ID to filter on column Reference, so you just get the files you want to target, and not all the library files. You can apply the filter by means of a more efficient Filter Query ODATA expression in the 'Get files (properties only)' or by means of a more flexible 'Filter Array' independent action block.

    Then you can follow a similar approach to the one in the thread I suggested in my first post: add an 'Apply to each' with the results filtered as its input, inside it add both a Get File Content, and an 'Append to Array' (please remember to initialize the variable first)

    Now add 'Send an email' out of the 'Apply to each, at the bottom of your PA flow

    THere is a third approach for the filtering, that is to use a Condition inside your apply to Each, as in this post.

     

    Hope this helps

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @efialttes ,

    I appreciate your help - I do a bit of work on the PowerApps forum, so I understand very well the importance of clear description of process.

    So my concept is that an array of IDs will arrive from PowerApps to Flow. I don't do a large amount of Flows and the one I sent is about 12 months old. I have had a go as below, but I know this is not there presently.

    AttachPhotosFlow.png

     

     

  • efialttes Profile Picture
    14,756 on at

    @WarrenBelz 

    Thanx again for your detailed design description!

     

    Now let's discuss about your current design.

    Let me say I think it is as valid as my first suggestion, and also simple (actually you do not need to deal with filters). Taking this current design as a start point, my suggestion is:

    1.- To leave Attachments variable Initialize value empty

    2.-To remove current 'Append to Attachments' value and add object structures instead, as in the 'Append to array' from the last example I shared https://www.portiva.nl/nl/portiblog/2018/03/07/send-email-with-multiple-attachments-using-microsoft-flow-in-office365

    Flow_MailMultipleAttachments20cAppendArrayLoop-2.png

    This way, when filling your Send an email attachment section, you just need to add your array variable, please note you have to clickon the icon with a 'T' surreounded by a square on the right upper corner of the Send an Email Attachment section to access  this other input method:

    Flow_MailMultipleAttachments50SendEmail-2.png

    Hope this helps

     

     

    Please let me know if you fin problems

     

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Thanks @efialttes ,

    Late Sunday night here - I will absorb your valued input tomorrow morning.

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    I am reviewing the last screenshot you shared, and realized that your final 'Send an email' Attachments Name should not contain 'File Content' output from your previous steps.

    Hope this also clarifies a little bit more the picture, and tomorrow we can shout 'Hurray'

     

     

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Yep - must have been getting tired - that is the file name. I will probably have more questions on that.

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    HI @efialttes ,

    And again thank for you help. My latest effort below - can you also confirm the ODATA filters are correct and my strategy with the letter is sound.

    ScopingFlow.png

  • v-alzhan-msft Profile Picture
    on at

    Hi @WarrenBelz ,

     

    You shouldn't add two Array attachments in the send an email action.

    You needn't create the array "LetterAttach", and you could add the item you want to add to the array "LetterAttach" to the array "Attachments" before the send an email action.

     

    Best regards,

    Alice       

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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard