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 Automate / send email with a spec...
Power Automate
Unanswered

send email with a specific attachment from SharePoint list

(1) ShareShare
ReportReport
Posted on by 36

Hi,

 

I made a flow that will send email of stored attachments in SharePoint list as email when a value in SharePoint list is modified.

 

what is happening now that i will get all stored attachment in SharePoint.

 

my goal is to get only the latest added attachment when the value in SharePoint list is modified. 

my flow is running like bellow:

Sara_Salim_0-1652264398868.png

 

Sara_Salim_1-1652264448902.png

Sara_Salim_2-1652264489596.png

 

 

what I can modify in this flow that will help me to get only the latest added attachment in the list. 

i have tried also to use  last(outputs('Get_attachments')?['body'])?['Id']  as ID in get attachment content 

 

thank you

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Hmm, it seems like (tested on my side) attachments come back to us in alpha-order by name, and their ID is only an encoded path.

    So I think what you'd need to do, rather than use "Last" (as that will always just get the furthest down the alphabet line), is - use "Get File Metadata Using Path" and point it at the "AbsoluteUri" output from your "Get Attachments" action. From here, you can see the "LastModified" date - so if you collect the filename and the LastModified into an array, then you should be able to figure out which is the most recent, and only send that one.

    Or, if that's a bit much, you could make another column and just add the filename of the attachments that have been sent. Ie, Bird.PNG is added, gets sent - add Bird.PNG; to a multi-line of text column against that item. Someone adds Cat.PNG - flow runs, checks if the attachment added is present in the MLT, if not, sends attachment, adds Cat.PNG to the MLT. 

    Cheers,

     

    Rhia

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I think the first paragraph solution should work. As currently her array is taking everything from her data source. But getting the path of the last modified document by date yyyyMMddhhmmss should at least get you the data you want to retrieve 

  • afjara04 Profile Picture
    14 on at

    Hi Rhia,

    Could you show your observations in the flow?, it is not so clear to me,

    thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard