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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send email with attach...
Power Apps
Unanswered

Send email with attachments from Sharepoint Library

(0) ShareShare
ReportReport
Posted on by 17

Hi all

 

I'm creating an app where I would like to attach multiple documents from a Sharepoint document library to an email.

 

I have a gallery with all files from the library where the user can choose which documents that should be attached. When choosing a document a collection is created and a flow is running to get the filecontent.

 

But the filecontent is not accepted in the email.

 

Can somebody help?

 

Thanks

Mikkel

Skærmbillede 2022-10-05 kl. 08.19.32.png
Skærmbillede 2022-10-05 kl. 08.18.24.png
Skærmbillede 2022-10-05 kl. 08.18.54.png
Categories:
  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at
    Collect(col_Attachment;{File:{Name:...., ContentBytes:....,'Odata':""}})

    Try implementing it this way

  • Schu94 Profile Picture
    17 on at

    It gives me an error which says "A column ContentBytes is missing with the type Blob"

  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    Have you tried sending mail directly throught the flow?

  • Schu94 Profile Picture
    17 on at

    When I send directly through a flow it works just fine. But I don't know how to loop through all chosen gallery items to add multiple attachments to the email

  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    MananMalhotra_0-1664957914112.png

    in the highlighted area

     {Attachments:First(Col_attachments.file)}

    could you try this once, it should attach the first attachment
    If this work will work in figuring out attaching multiple at once

  • Schu94 Profile Picture
    17 on at

    Unfortunately same error 😞

  • LeandroTF Profile Picture
    18 on at

    Hi I am trying to do something similar, I have the files saved in the SP library and I am showing them in a power apps gallery, the plan is to send the selected items (full patch or identifier, not sure yet) to a flow, attaching them to the email, and send them to my printer to print them out. 

     

    Would you mind sharing with me how you built your flow on power automate to send the files by email? 

     

    LeandroTF_0-1665012931101.png

     

     

     

     

     

  • Schu94 Profile Picture
    17 on at

    Hi LeandroTF

     

    I just did it for one attachment when selecting in gallery to check if it would work.

    I'm not sure how to loop through the gallery.

    Maybe you can just use a collection as input to the flow and then for each loop?

     

    Skærmbillede 2022-10-06 kl. 06.42.14.png

    Skærmbillede .png

  • LeandroTF Profile Picture
    18 on at

    Hi @Schu94 , 

    I just implemented your flow on my end,
    Saved the ThisItem.'File path', in another variable to use in the flow trigger, and it works perfectly, thanks.
     
    Once again, thanks for sharing! 


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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard