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

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,323 Super User 2025 Season 2 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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard