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 / Compare list attachmen...
Power Automate
Unanswered

Compare list attachments to file library to check for duplicate file names

(0) ShareShare
ReportReport
Posted on by 98

Looking for flow logic to accomplish the following:

read attachments when a SharePoint list entry is added

Compare those filenames to filenames of contents of a document library

If duplicate is found, send an email with the duplicate filename and exit the flow

Categories:
I have the same question (0)
  • rmerydith Profile Picture
    50 on at

    @dmooreii This below should help you out. Make sure the trigger is when a new item is created, next get the attachment content from the created item, get files (properties only) from the document library. Use apply to each to loop through the files in the document library, compare them against the attachment name and send the email. Please change "is equal to" to "contains" This is very generic and basic. If you need further clarification, please let me know. Hope this helps.  

    rmerydith_0-1610055005519.png

     

  • dmooreii Profile Picture
    98 on at

    Under the condition check, there is no dynamic object available for "Attachment" anything

  • rmerydith Profile Picture
    50 on at

    Are you sure you have everything laid out like I have in the screen shot? It will be there if everything is correct. Have you searched for it? 

  • dmooreii Profile Picture
    98 on at

    What do i need to use for Id and File Identifier for Get Attachment Content ?

  • rmerydith Profile Picture
    50 on at

    For ID, search for ID and For File Identifier, user identifier. You may need to search for these. Sometimes they can hide. 

  • dmooreii Profile Picture
    98 on at

    Not working

     

    dmooreii_0-1610125913960.png

    body('Get_attachment_content')?['body']

  • rmerydith Profile Picture
    50 on at

    @dmooreii are you using the ID from the trigger?

  • dmooreii Profile Picture
    98 on at

    ??? Trigger is "when an item is created". 

  • rmerydith Profile Picture
    50 on at

    Yes. You want the ID in Get attachment content to be the ID from the Tigger (when an item is created). 

  • dmooreii Profile Picture
    98 on at

    There is no way to set that in the trigger. Just have site address and list name.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard