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 / Email only 1 attachmen...
Power Automate
Answered

Email only 1 attachment from Sharepoint list based on file name

(3) ShareShare
ReportReport
Posted on by 10
I have a Sharepoint list where items can have multiple attachments.  I have a flow that works successfully that sends an email when a certain field in the Sharepoint list is changed.  However, it sends ALL of the file attachments that are on that Sharepoint list item in the email.  What I want is for it to only send the file attachment that has "DRAFT" in its file name.  Currently I have my AttachmentArray variable in the Attachments field in the Send an email component which sends all of the attachments.  Below is a snippet of my current flow.
 
I have tried what I thought would work, as well as a few different things I found on posts but I have not been successful.  Does anyone have any tips so that not all attachments are sent, just the one that I want?
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,960 Moderator on at
    Hi
     
     
    I am assuming that your first For Each is looping through the Attachments of the Item??
     
    If so, then inside of it, dont get the Content
     
    First put a condition
     
    left side = the DisplayName dynamic property
    middle = contains
    right side = whatever string you want (hard code it, make it environment variable whatever)
     
    Inside the yes, add it to your Array
     
    otherwise skip the rest
     
    Cheers,
     
     
     
     
     
  • cmaly Profile Picture
    10 on at
    FLMike thanks so much for your quick reply.  I was able to try it out tonight and that was exactly what I needed.  I was obvioulsy putting my condition in the wrong spot in all of my trial and errors.  Much appreciated!!

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