web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Comparing List/ Item/ ...
Power Automate
Unanswered

Comparing List/ Item/ Attachment names with Library/File names

(0) ShareShare
ReportReport
Posted on by

Hello all!!! 

 

Hope you are all doing fine

 

I have a flow where I took attachments of list items and create a library list with them. 

 

This is how it looks like now.

alicivit_0-1706020386714.png

 

I have a problem now. When a colleague uploads an attachment which has the same name already uploaded, the flow (actually flows) fails. Now I have to compare each new attachment with the existing library file names and if they have the same name the attachment should be deleted and mailed so on... 

 

You may decide to create a new flow before this flow or within. 

 

 

thank you all! 

 

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at
    Re: Comparing List/ Item/ Attachment names with Library/File names

    Hi @Anonymous ,

     

    If the attachment has the same name with the file in the document library and, and you want to delete it, I made a sample for you.

     

    vxiaochenmsft_0-1706064590201.png

    vxiaochenmsft_1-1706064690062.png

     

    Best Regards,

    Wearsky

  • Community Power Platform Member Profile Picture
    on at
    Re: Comparing List/ Item/ Attachment names with Library/File names

    @v-xiaochen-msft  thank you for your answer Wearsky! 

     

    Just to inform, there are always 2 attachments in each list items. First attachment always docx and the second one (which is the reason of this new flow) is a JPG file. 

     

    Does this info changes any flow progress? Because what this leads me to think "I have to insert a condition for absoluteUri contains JPG" if it is correct than I can insert this second condition.

     

    Best Regards

  • Community Power Platform Member Profile Picture
    on at
    Re: Comparing List/ Item/ Attachment names with Library/File names

    I tried and it failed as fallowed...

     

    alicivit_0-1706079070837.png

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Comparing List/ Item/ Attachment names with Library/File names

    I mistyped length... Fixed it. 

     

    But now the condition, length(body('Filter_array')) is greater than 0 always goes no. 

     

    length(body('Filter_array'))
    alicivit_0-1706084673500.png

     

     

    here is an example 

    the first attachment is a docx file therefore (I guess) the condition is false

     

    alicivit_1-1706084815973.png

     

    but the second file is a jpg file condition 2 succeeded 

    but it failed condition 3 which is checking if the titles are same. In this example they are the same. I upload an already uploaded jpg file but it failed. 

     

    alicivit_2-1706084965823.png

     

    thank you all

    have a nice day

     

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard