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 / 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)
  • afjara04 Profile Picture
    14 on at

    Hi Rhia,

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

    thanks

  • Community Power Platform Member Profile Picture
    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 

  • Rhiassuring Profile Picture
    8,690 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

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
David_MA Profile Picture

David_MA 258 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 205 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 204 Most Valuable Professional

Last 30 days Overall leaderboard