Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Move Duplicate File to Another Folder

(0) ShareShare
ReportReport
Posted on by

I have a flow that is triggered when a "New Email Arrives" with an attachment which then creates a file in a SP document library with the attachment. Plumsail is then used to extract data from the PDF and the data is used to update the file properties in the SP document library. I have a few columns that are updated with data from the PDF through plumsail with the most significant being the Employee# column. Where I am having trouble is having the flow move a file if the Employee# is a duplicate keeping the newest file in the document library.

The flow I am looking for would be something like this:

 

New Email Arrives with Attachment > Attachment is saved as a file in SP document library > Attachment Data is extracted from PDF through Plumsail > Document Properties are updated including Employee# > IF Employee# is duplicate move older file to archived folder

 

I have everything up to the part in bold working fine. All of the threads I have read on this have not worked. Any help would be greatly appreciated.

 

Screenshots:

 

clbrown2_0-1649446902872.png 

clbrown2_1-1649446919424.png

 

Document Library Columns:

 

clbrown2_2-1649446965932.png

 

 

  • Rhiassuring Profile Picture
    8,688 Super User 2025 Season 1 on at
    Re: Move Duplicate File to Another Folder

    Hi there, 

    Is your Employee # field a "Enforce Unique" column? And, is it required? 

    I'm going to assume both are "yes" just for the sake of responding for the moment.

    I think what I'd do is, as soon as I get the Employee # from Plumsail, I'd stick it in a variable and filter the SharePoint Library on it. If the response is empty, then, I can go ahead as normal - if it's not, though, then use the output from that Filter to Move File to the Archive.  THEN update the Employee # on my new file. 

    Have you tried something like that?

     

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1